ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1599325 - in /ctakes/trunk: ./ ctakes-dictionary-lookup-res/ ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/ ctakes-dictionary-lookup/ ctakes-dictionary-lookup/desc/analysis_engine/ ctakes-dictionary-lo...
Date Mon, 02 Jun 2014 19:37:42 GMT
Author: chenpei
Date: Mon Jun  2 19:37:41 2014
New Revision: 1599325

URL: http://svn.apache.org/r1599325
Log:
CTAKES-297: Added factory descriptor grabber method to dictionary - 
Default lookup/LookupDesc_Db.xml to the hsqldb versions instead of Lucene rx_norm/orange_book.
Add/autodownload orangebook/rxnorm from maven central just like the umlsab resources.

Modified:
    ctakes/trunk/ctakes-dictionary-lookup-res/pom.xml
    ctakes/trunk/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
    ctakes/trunk/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml
    ctakes/trunk/ctakes-dictionary-lookup/pom.xml
    ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
    ctakes/trunk/pom.xml

Modified: ctakes/trunk/ctakes-dictionary-lookup-res/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-res/pom.xml?rev=1599325&r1=1599324&r2=1599325&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-res/pom.xml (original)
+++ ctakes/trunk/ctakes-dictionary-lookup-res/pom.xml Mon Jun  2 19:37:41 2014
@@ -29,4 +29,53 @@
   <artifactId>ctakes-dictionary-lookup-res</artifactId>
   <name>Apache cTAKES Resources dictionary-lookup</name>
   <description>Resources Project for ctakes-dictionary-lookup</description>
+
+  <dependencies>
+		<!-- cTAKES Resources -->
+		<dependency>
+			<groupId>net.sourceforge.ctakesresources</groupId>
+			<artifactId>ctakes-resources-umls2011ab</artifactId>
+			<version>3.1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sourceforge.ctakesresources</groupId>
+			<artifactId>ctakes-resources-rxnorm-hsqldb-2011ab</artifactId>
+			<version>3.1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sourceforge.ctakesresources</groupId>
+			<artifactId>ctakes-resources-orangebook-hsqldb</artifactId>
+			<version>3.1.2</version>
+		</dependency>		
+		<dependency>
+			<groupId>net.sourceforge.ctakesresources</groupId>
+			<artifactId>ctakes-resources-snomed-rword-hsqldb-2011ab</artifactId>
+			<version>3.1.2</version>
+		</dependency>				
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>unpack-dependencies</id>
+						<phase>process-resources</phase>
+						<goals>
+							<goal>unpack-dependencies</goal>
+						</goals>
+						<configuration>
+							<includeArtifactId>ctakes-resources-umls2011ab</includeArtifactId>
+							<includeArtifactId>ctakes-resources-rxnorm-hsqldb-2011ab</includeArtifactId>
+							<includeArtifactId>ctakes-resources-orangebook-hsqldb</includeArtifactId>
+							<includeArtifactId>ctakes-resources-snomed-rword-hsqldb-2011ab</includeArtifactId>
						
+              <!-- <includes>**/*</includes> -->
+							<outputDirectory>${project.build.directory}/classes</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>  
 </project>

Modified: ctakes/trunk/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml?rev=1599325&r1=1599324&r2=1599325&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
Mon Jun  2 19:37:41 2014
@@ -37,14 +37,13 @@
 	
 		<dictionary id="DICT_RXNORM" externalResourceKey="RxnormIndexReader" caseSensitive="false">
 			<implementation>
-				<luceneImpl/>
+				<jdbcImpl tableName="umls_ms_2011ab_rxnorm"/>
 			</implementation>
-			<lookupField fieldName="first_word"/>
+			<lookupField fieldName="fword"/>
 			<metaFields>
-				<metaField fieldName="code"/>
-				<metaField fieldName="codeRxNorm"/>
-				<metaField fieldName="preferred_designation"/>
-				<metaField fieldName="other_designation"/>
+        <metaField fieldName="cui"/>
+        <metaField fieldName="tui"/>
+        <metaField fieldName="text"/>
 			</metaFields>
 		</dictionary>
 	
@@ -82,20 +81,24 @@
 			<dictionaryRef idRef="DICT_RXNORM"/>
 			<lookupInitializer className="org.apache.ctakes.dictionary.lookup.ae.FirstTokenPermLookupInitializerImpl">
 				<properties>
-					<property key="textMetaFields" value="preferred_designation|other_designation"/>
+					<property key="textMetaFields" value="text"/>
 					<property key="maxPermutationLevel" value="7"/>
 					<!--	<property key="windowAnnotations" value="org.apache.ctakes.typesystem.type.textspan.Sentence"/>
-->
 					<property key="windowAnnotations" value="org.apache.ctakes.typesystem.type.textspan.LookupWindowAnnotation"/>
 
-					<property key="exclusionTags" value="VB,VBD,VBG,VBN,VBP,VBZ,CC,CD,DT,EX,LS,MD,PDT,POS,PP,PP$,RP,TO,WDT,WP,WPS,WRB"/>
+					<property key="exclusionTags" value="VB,VBD,VBG,VBN,VBP,VBZ,CC,CD,DT,EX,IN,LS,MD,PDT,POS,PP,PP$,RP,TO,WDT,WP,WPS,WRB"/>
 				</properties>
 			</lookupInitializer>
-			<lookupConsumer className="org.apache.ctakes.dictionary.lookup.ae.OrangeBookFilterConsumerImpl">
+      <lookupConsumer className="org.apache.ctakes.dictionary.lookup.ae.UmlsToSnomedDbConsumerImpl">
 				<properties>
-					<property key="codingScheme" value="RXNORM"/>
-					<property key="codeMetaField" value="codeRxNorm"/> <!-- Use value="code" for
UMLS CUIs -->
-					<property key="luceneFilterExtResrcKey" value="OrangeBookIndexReader"/>
+          <property key="codingScheme" value="RXNORM"/>
+          <property key="cuiMetaField" value="cui"/>
+          <property key="tuiMetaField" value="tui"/>
+          <property key="medicationTuis" value="T073,T103,T109,T110,T111,T115,T121,T122,T123,T130,T168,T192,T195,T197,T200,T203"/>
+          <property key="dbConnExtResrcKey" value="OrangeBookIndexReader"/>
+          <property key="mapPrepStmt" value="select CODERXNORM from ORANGE_BOOK where
CODE=?"/>
 				</properties>
 			</lookupConsumer>
+		
 		</lookupBinding>
 		
 	</lookupBindings>

Modified: ctakes/trunk/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml?rev=1599325&r1=1599324&r2=1599325&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml
Mon Jun  2 19:37:41 2014
@@ -234,13 +234,25 @@
             <name/>
             <configurationParameters>
               <configurationParameter>
-                <name>UseMemoryIndex</name>
-                <type>Boolean</type>
+                <name>DriverClassName</name>
+                <type>String</type>
+                <multiValued>false</multiValued>
+                <mandatory>true</mandatory>
+              </configurationParameter>
+              <configurationParameter>
+                <name>URL</name>
+                <type>String</type>
                 <multiValued>false</multiValued>
                 <mandatory>true</mandatory>
               </configurationParameter>
               <configurationParameter>
-                <name>IndexDirectory</name>
+                <name>Username</name>
+                <type>String</type>
+                <multiValued>false</multiValued>
+                <mandatory>true</mandatory>
+              </configurationParameter>
+              <configurationParameter>
+                <name>Password</name>
                 <type>String</type>
                 <multiValued>false</multiValued>
                 <mandatory>true</mandatory>
@@ -248,21 +260,33 @@
             </configurationParameters>
             <configurationParameterSettings>
               <nameValuePair>
-                <name>UseMemoryIndex</name>
+                <name>DriverClassName</name>
+                <value>
+                  <string>org.hsqldb.jdbcDriver</string>
+                </value>
+              </nameValuePair>
+              <nameValuePair>
+                <name>URL</name>
+                <value>
+                  <string>jdbc:hsqldb:res:/org/apache/ctakes/dictionary/lookup/rx_norm_hsqldb/umls</string>
+                </value>
+              </nameValuePair>
+              <nameValuePair>
+                <name>Username</name>
                 <value>
-                  <boolean>true</boolean>
+                  <string>SA</string>
                 </value>
               </nameValuePair>
               <nameValuePair>
-                <name>IndexDirectory</name>
+                <name>Password</name>
                 <value>
-                  <string>org/apache/ctakes/dictionary/lookup/rxnorm_index</string>
+                  <string/>
                 </value>
               </nameValuePair>
             </configurationParameterSettings>
           </resourceMetaData>
         </configurableDataResourceSpecifier>
-        <implementationName>org.apache.ctakes.core.resource.LuceneIndexReaderResourceImpl</implementationName>
+        <implementationName>org.apache.ctakes.core.resource.JdbcConnectionResourceImpl</implementationName>
       </externalResource>
       <externalResource>
         <name>OrangeBookIndex</name>
@@ -273,13 +297,25 @@
             <name/>
             <configurationParameters>
               <configurationParameter>
-                <name>UseMemoryIndex</name>
-                <type>Boolean</type>
+                <name>DriverClassName</name>
+                <type>String</type>
+                <multiValued>false</multiValued>
+                <mandatory>true</mandatory>
+              </configurationParameter>
+              <configurationParameter>
+                <name>URL</name>
+                <type>String</type>
                 <multiValued>false</multiValued>
                 <mandatory>true</mandatory>
               </configurationParameter>
               <configurationParameter>
-                <name>IndexDirectory</name>
+                <name>Username</name>
+                <type>String</type>
+                <multiValued>false</multiValued>
+                <mandatory>true</mandatory>
+              </configurationParameter>
+              <configurationParameter>
+                <name>Password</name>
                 <type>String</type>
                 <multiValued>false</multiValued>
                 <mandatory>true</mandatory>
@@ -287,21 +323,33 @@
             </configurationParameters>
             <configurationParameterSettings>
               <nameValuePair>
-                <name>UseMemoryIndex</name>
+                <name>DriverClassName</name>
+                <value>
+                  <string>org.hsqldb.jdbcDriver</string>
+                </value>
+              </nameValuePair>
+              <nameValuePair>
+                <name>URL</name>
+                <value>
+                  <string>jdbc:hsqldb:res:/org/apache/ctakes/dictionary/lookup/orange_book_hsqldb/umls</string>
+                </value>
+              </nameValuePair>
+              <nameValuePair>
+                <name>Username</name>
                 <value>
-                  <boolean>true</boolean>
+                  <string>SA</string>
                 </value>
               </nameValuePair>
               <nameValuePair>
-                <name>IndexDirectory</name>
+                <name>Password</name>
                 <value>
-                  <string>org/apache/ctakes/dictionary/lookup/OrangeBook</string>
+                  <string/>
                 </value>
               </nameValuePair>
             </configurationParameterSettings>
           </resourceMetaData>
         </configurableDataResourceSpecifier>
-        <implementationName>org.apache.ctakes.core.resource.LuceneIndexReaderResourceImpl</implementationName>
+        <implementationName>org.apache.ctakes.core.resource.JdbcConnectionResourceImpl</implementationName>
       </externalResource>
     </externalResources>
     <externalResourceBindings>

Modified: ctakes/trunk/ctakes-dictionary-lookup/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup/pom.xml?rev=1599325&r1=1599324&r2=1599325&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup/pom.xml (original)
+++ ctakes/trunk/ctakes-dictionary-lookup/pom.xml Mon Jun  2 19:37:41 2014
@@ -74,34 +74,5 @@
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
 		</dependency>
-
-		<!-- cTAKES Resources -->
-		<dependency>
-			<groupId>net.sourceforge.ctakesresources</groupId>
-			<artifactId>ctakes-resources-umls2011ab</artifactId>
-			<version>3.1.1</version>
-		</dependency>
 	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-dependencies</id>
-						<phase>process-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeArtifactIds>ctakes-resources-umls2011ab</includeArtifactIds>
-              <!-- <includes>**/*</includes> -->
-							<outputDirectory>${project.build.directory}/classes</outputDirectory>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
 </project>

Modified: ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java?rev=1599325&r1=1599324&r2=1599325&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
Mon Jun  2 19:37:41 2014
@@ -123,7 +123,7 @@ public class UmlsDictionaryLookupAnnotat
           "LookupDescriptor",
           ExternalResourceFactory.createExternalResourceDescription(
               FileResourceImpl.class,
-              FileLocator.locateFile("org/apache/ctakes/dictionary/lookup/LookupDesc_Db_hsql.xml")),
+              FileLocator.locateFile("org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml")),
           "DbConnection",
           ExternalResourceFactory.createExternalResourceDescription(
               JdbcConnectionResourceImpl.class,

Modified: ctakes/trunk/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/pom.xml?rev=1599325&r1=1599324&r2=1599325&view=diff
==============================================================================
--- ctakes/trunk/pom.xml (original)
+++ ctakes/trunk/pom.xml Mon Jun  2 19:37:41 2014
@@ -418,7 +418,7 @@
 			<dependency>
 				<groupId>junit</groupId>
 				<artifactId>junit</artifactId>
-				<version>[4.10]</version>
+				<version>4.10</version>
 				<scope>test</scope>
 			</dependency>
 			<dependency>



Mime
View raw message