ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vjapa...@apache.org
Subject svn commit: r1555011 - in /ctakes/branches/ytex: ctakes-assertion-zoner/ ctakes-clinical-pipeline/ ctakes-core/ ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/ ctakes-distribution/ ctakes-distribution/src/main/assem...
Date Fri, 03 Jan 2014 05:53:03 GMT
Author: vjapache
Date: Fri Jan  3 05:53:02 2014
New Revision: 1555011

URL: http://svn.apache.org/r1555011
Log:
fix csv loader 
fix versions in pom
add ytex to distribution

Modified:
    ctakes/branches/ytex/ctakes-assertion-zoner/.classpath
    ctakes/branches/ytex/ctakes-clinical-pipeline/pom.xml
    ctakes/branches/ytex/ctakes-core/pom.xml
    ctakes/branches/ytex/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
    ctakes/branches/ytex/ctakes-distribution/pom.xml
    ctakes/branches/ytex/ctakes-distribution/src/main/assembly/bin.xml
    ctakes/branches/ytex/ctakes-ytex-res/pom.xml
    ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl/xdl.xsd
    ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/ytex/ytex.properties.mssql.example
    ctakes/branches/ytex/ctakes-ytex-uima/pom.xml
    ctakes/branches/ytex/ctakes-ytex/pom.xml
    ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml
    ctakes/branches/ytex/ctakes-ytex/scripts/data/umls/v_snomed_fword_lookup.txt
    ctakes/branches/ytex/ctakes-ytex/src/main/java/org/apache/ctakes/jdl/data/loader/CsvLoader.java

Modified: ctakes/branches/ytex/ctakes-assertion-zoner/.classpath
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-assertion-zoner/.classpath?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-assertion-zoner/.classpath (original)
+++ ctakes/branches/ytex/ctakes-assertion-zoner/.classpath Fri Jan  3 05:53:02 2014
@@ -17,12 +17,6 @@
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="src" output="target/classes" path="target/generated-sources/jcasgen">
-		<attributes>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
 		<attributes>
 			<attribute name="maven.pomderived" value="true"/>

Modified: ctakes/branches/ytex/ctakes-clinical-pipeline/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-clinical-pipeline/pom.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-clinical-pipeline/pom.xml (original)
+++ ctakes/branches/ytex/ctakes-clinical-pipeline/pom.xml Fri Jan  3 05:53:02 2014
@@ -81,6 +81,18 @@
 			<groupId>org.apache.ctakes</groupId>
 			<artifactId>ctakes-dependency-parser-res</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex-res</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex-uima</artifactId>
+		</dependency>
 	</dependencies>
 	<profiles>
 		<profile>

Modified: ctakes/branches/ytex/ctakes-core/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-core/pom.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-core/pom.xml (original)
+++ ctakes/branches/ytex/ctakes-core/pom.xml Fri Jan  3 05:53:02 2014
@@ -64,6 +64,10 @@
 			<artifactId>jdom2</artifactId>
 		</dependency>
 		<dependency>
+			<groupId>org.cleartk</groupId>
+			<artifactId>cleartk-util</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>com.google.guava</groupId>
 			<artifactId>guava</artifactId>
 		</dependency>

Modified: ctakes/branches/ytex/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
(original)
+++ ctakes/branches/ytex/ctakes-dictionary-lookup-res/src/main/resources/org/apache/ctakes/dictionary/lookup/LookupDesc_Db.xml
Fri Jan  3 05:53:02 2014
@@ -22,31 +22,18 @@
 <lookupSpecification>
 	<!--  Defines what dictionaries will be used in terms of implementation specifics and
metaField configuration. -->
 	<dictionaries>
-	
-		<dictionary id="DICT_UMLS_MS" externalResourceKey="DbConnection" caseSensitive="false">
-			<implementation>
-				<jdbcImpl tableName="umls_ms_2011ab"/>
-			</implementation>
-			<lookupField fieldName="fword"/>
-			<metaFields>
-				<metaField fieldName="cui"/>
-				<metaField fieldName="tui"/>
-				<metaField fieldName="text"/>
-			</metaFields>
-		</dictionary>
-	
-		<dictionary id="DICT_RXNORM" externalResourceKey="RxnormIndexReader" caseSensitive="false">
+		<dictionary id="DICT_UMLS_MS" externalResourceKey="DbConnection"
+			caseSensitive="false">
 			<implementation>
-				<luceneImpl/>
+				<jdbcImpl tableName="@db.schema@.v_snomed_fword_lookup"/>
 			</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="tok_str" />
 			</metaFields>
-		</dictionary>
+		</dictionary>	
 	
 	</dictionaries>
 	<!-- Binds together the components necessary to perform the complete lookup logic start
to end. -->
@@ -63,40 +50,14 @@
 					<property key="exclusionTags" value="VB,VBD,VBG,VBN,VBP,VBZ,CC,CD,DT,EX,IN,LS,MD,PDT,POS,PP,PP$,PRP,PRP$,RP,TO,WDT,WP,WPS,WRB"/>
 				</properties>
 			</lookupInitializer>
-			<lookupConsumer className="org.apache.ctakes.dictionary.lookup.ae.UmlsToSnomedDbConsumerImpl">
-				<properties>
-					<property key="codingScheme" value="SNOMED"/>
-					<property key="cuiMetaField" value="cui"/>
-					<property key="tuiMetaField" value="tui"/>
-					<property key="anatomicalSiteTuis" value="T021,T022,T023,T024,T025,T026,T029,T030"/>
-					<property key="procedureTuis" value="T059,T060,T061"/>
-					<property key="disorderTuis" value="T019,T020,T037,T046,T047,T048,T049,T050,T190,T191"/>
-					<property key="findingTuis" value="T033,T034,T040,T041,T042,T043,T044,T045,T046,T056,T057,T184"/>
-					<property key="dbConnExtResrcKey" value="DbConnection"/>
-					<property key="mapPrepStmt" value="select code from umls_snomed_map where cui=?"/>
-				</properties>
-			</lookupConsumer>
-		</lookupBinding>
-	
-		<lookupBinding>
-			<dictionaryRef idRef="DICT_RXNORM"/>
-			<lookupInitializer className="org.apache.ctakes.dictionary.lookup.ae.FirstTokenPermLookupInitializerImpl">
-				<properties>
-					<property key="textMetaFields" value="preferred_designation|other_designation"/>
-					<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"/>
-				</properties>
-			</lookupInitializer>
-			<lookupConsumer className="org.apache.ctakes.dictionary.lookup.ae.OrangeBookFilterConsumerImpl">
+			<lookupConsumer className="org.apache.ctakes.dictionary.lookup.ae.NamedEntityLookupConsumerImpl">
 				<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="UMLS" />
+					<property key="codeMetaField" value="cui" />
+					<property key="cuiMetaField" value="cui" />
+					<property key="tuiMetaField" value="tui" />
 				</properties>
 			</lookupConsumer>
 		</lookupBinding>
-		
 	</lookupBindings>
 </lookupSpecification>

Modified: ctakes/branches/ytex/ctakes-distribution/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-distribution/pom.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-distribution/pom.xml (original)
+++ ctakes/branches/ytex/ctakes-distribution/pom.xml Fri Jan  3 05:53:02 2014
@@ -116,6 +116,14 @@
 			<groupId>org.apache.ctakes</groupId>
 			<artifactId>ctakes-smoking-status</artifactId>
 		</dependency>						
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex</artifactId>
+		</dependency>						
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex-uima</artifactId>
+		</dependency>						
 	</dependencies>
 
 	<build>

Modified: ctakes/branches/ytex/ctakes-distribution/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-distribution/src/main/assembly/bin.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-distribution/src/main/assembly/bin.xml (original)
+++ ctakes/branches/ytex/ctakes-distribution/src/main/assembly/bin.xml Fri Jan  3 05:53:02
2014
@@ -57,10 +57,18 @@
 				<!-- <include>org.apache.ctakes:ctakes-temporal</include> -->
 				<include>org.apache.ctakes:ctakes-type-system</include>
 				<include>org.apache.ctakes:ctakes-utils</include>
+				<include>org.apache.ctakes:ctakes-ytex</include>
+				<include>org.apache.ctakes:ctakes-ytex-uima</include>
 			</includes>
 			
             <excludes>
 	        	<exclude>net.sourceforge.ctakesresources:*</exclude>
+	        	<!-- exclude non-asf compliant dependencies used by ytex -->
+	        	<exclude>org.hibernate:*</exclude>
+	        	<exclude>nz.ac.waikato.cms.weka:*</exclude>
+	        	<exclude>mysql:*</exclude>
+	        	<exclude>com.microsoft.sqlserver:*</exclude>
+	        	<exclude>oracle.jdbc:*</exclude>
 	        </excludes>			
 			<unpack>false</unpack>
 			<useProjectArtifact>false</useProjectArtifact>
@@ -380,5 +388,17 @@
 			<fileMode>644</fileMode>
 			<directoryMode>755</directoryMode>
     	</fileSet>    	    	
+		<fileSet>
+		    <directory>../ctakes-ytex-res/src/main/resources</directory>
+		    <outputDirectory>resources</outputDirectory>
+			<fileMode>644</fileMode>
+			<directoryMode>755</directoryMode>
+    	</fileSet>    	    	
+		<fileSet>
+		    <directory>../ctakes-ytex/scripts</directory>
+		    <outputDirectory>bin/ctakes-ytex/scripts</outputDirectory>
+			<fileMode>644</fileMode>
+			<directoryMode>755</directoryMode>
+    	</fileSet>    	    	
 	</fileSets>
 </assembly>
\ No newline at end of file

Modified: ctakes/branches/ytex/ctakes-ytex-res/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-res/pom.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-res/pom.xml (original)
+++ ctakes/branches/ytex/ctakes-ytex-res/pom.xml Fri Jan  3 05:53:02 2014
@@ -1,32 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.ctakes</groupId>
-    <artifactId>ctakes</artifactId>
-    <version>3.2.0-SNAPSHOT</version>
-  </parent>
-  <artifactId>ctakes-ytex-res</artifactId>
-  <name>Apache cTAKES Resources ctakes-ytex-res</name>
-  <description>Resources Project for yex</description>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.ctakes</groupId>
+		<artifactId>ctakes</artifactId>
+		<version>3.1.2-SNAPSHOT</version>
+	</parent>
+	<artifactId>ctakes-ytex-res</artifactId>
+	<name>Apache cTAKES Resources ctakes-ytex-res</name>
+	<description>Resources Project for yex</description>
 </project>
\ No newline at end of file

Modified: ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl/xdl.xsd
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl/xdl.xsd?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl/xdl.xsd
(original)
+++ ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl/xdl.xsd
Fri Jan  3 05:53:02 2014
@@ -56,7 +56,7 @@
         </xs:restriction>
       </xs:simpleType>
     </xs:attribute>
-    <xs:attribute default="&quot;" name="encapsulator">
+    <xs:attribute name="encapsulator">
       <xs:simpleType>
         <xs:restriction base="xs:token">
           <xs:length value="1" />

Modified: ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/ytex/ytex.properties.mssql.example
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/ytex/ytex.properties.mssql.example?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/ytex/ytex.properties.mssql.example
(original)
+++ ctakes/branches/ytex/ctakes-ytex-res/src/main/resources/org/apache/ctakes/ytex/ytex.properties.mssql.example
Fri Jan  3 05:53:02 2014
@@ -1,12 +1,12 @@
 # database (catalog) name
-db.name=YTEX_TEST
+db.name=YTEX
 
 # schema. default is dbo
-db.schema=test
+db.schema=dbo
 
 # jdbc url for database.  Replace localhost and YTEX_TEST 
 # with the values of db.host and db.name respectively
-db.url=jdbc:sqlserver://localhost;databaseName=YTEX_TEST;integratedSecurity=true
+db.url=jdbc:sqlserver://localhost;databaseName=YTEX;integratedSecurity=true
 
 # assume windows integrated authentication, change if necessary
 db.username=

Modified: ctakes/branches/ytex/ctakes-ytex-uima/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-uima/pom.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-uima/pom.xml (original)
+++ ctakes/branches/ytex/ctakes-ytex-uima/pom.xml Fri Jan  3 05:53:02 2014
@@ -17,7 +17,7 @@
 	<parent>
 		<groupId>org.apache.ctakes</groupId>
 		<artifactId>ctakes</artifactId>
-		<version>3.2.0-SNAPSHOT</version>
+		<version>3.1.2-SNAPSHOT</version>
 	</parent>
 	<dependencies>
 		<dependency>
@@ -42,11 +42,6 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.ctakes</groupId>
-			<artifactId>ctakes-clinical-pipeline</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.ctakes</groupId>
 			<artifactId>ctakes-pos-tagger</artifactId>
 			<scope>test</scope>
 		</dependency>

Modified: ctakes/branches/ytex/ctakes-ytex/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/pom.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex/pom.xml (original)
+++ ctakes/branches/ytex/ctakes-ytex/pom.xml Fri Jan  3 05:53:02 2014
@@ -17,7 +17,7 @@
 	<parent>
 		<groupId>org.apache.ctakes</groupId>
 		<artifactId>ctakes</artifactId>
-		<version>3.2.0-SNAPSHOT</version>
+		<version>3.1.2-SNAPSHOT</version>
 	</parent>
 	<dependencies>
 		<!-- begin non ASF compliant dependencies -->
@@ -112,7 +112,7 @@
 		<dependency>
 			<groupId>org.apache.solr</groupId>
 			<artifactId>solr-commons-csv</artifactId>
-			<version>1.4.0</version>
+			<version>3.5.0</version>
 		</dependency>
 		<dependency>
 			<groupId>log4j</groupId>
@@ -189,6 +189,11 @@
 			<artifactId>ant-launcher</artifactId>
 			<version>1.9.2</version>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.ant</groupId>
+			<artifactId>ant</artifactId>
+			<version>1.9.2</version>
+		</dependency>
 	</dependencies>
 	<build>
 		<extensions>
@@ -295,6 +300,7 @@
 								<ant antfile="build.xml" dir="scripts/data" target="all">
 									<property name="config.local" value="${project.build.testOutputDirectory}" />
 									<property name="db.type" value="${db.type}" />
+									<property name="ytex.test" value="true" />
 								</ant>
 							</target>
 						</configuration>

Modified: ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml (original)
+++ ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml Fri Jan  3 05:53:02 2014
@@ -69,7 +69,7 @@ Database connection parameters are taken
 		<echo>db.type ${db.type}</echo>
 	</target>
 	<target name="dbping" description="verify db connection params" unless="hsql">
-		<java classname="ytex.tools.DBPing" fork="yes" classpathref="${kernel.cp}" failonerror="yes">
+		<java classname="org.apache.ctakes.ytex.tools.DBPing" fork="yes" classpathref="${kernel.cp}"
failonerror="yes">
 			<jvmarg value="${log4j.arg}" />
 			<jvmarg value="-Xmx64m" />
 			<arg value="${config.local}/org/apache/ctakes/ytex/ytex.properties" />
@@ -260,10 +260,18 @@ Database connection parameters are taken
 			<fileset dir="${java.io.tmpdir}" includes="MRREL.RRF,MRCONSO.RRF,MRSTY.RRF,umls_aui_fword.txt"
/>
 		</delete>
 	</target>
-	<target name="umls.import.view" depends="init.conn">
-		<echo>import v_snomed_fword_lookup.  Be patient, this can take a while.</echo>
+	<target name="umls.import.view" depends="init.conn" description="load v_snomed_fword_lookup.txt.
Use file from resources directory if it exists and if ytex.test is not defined">
+		<condition property="view.jdl.data" value="${ytex.resources.home}/org/apache/ctakes/ytex/dictionary/lookup/v_snomed_fword_lookup.txt"
else="${basedir}/umls/v_snomed_fword_lookup.txt">
+			<and>
+				<available file="${ytex.resources.home}/org/apache/ctakes/ytex/dictionary/lookup/v_snomed_fword_lookup.txt"
/>
+				<not>
+					<isset property="ytex.test" />
+				</not>
+			</and>
+		</condition>
+		<echo>import v_snomed_fword_lookup from ${view.jdl.data}.  Be patient, this can take
a while.</echo>
 		<antcall target="jdl">
-			<param name="jdl.data" value="${umls.data}/v_snomed_fword_lookup.txt" />
+			<param name="jdl.data" value="${view.jdl.data}" />
 			<param name="jdl.format" value="${basedir}/umls/v_snomed_fword_lookup.xml" />
 		</antcall>
 	</target>
@@ -279,7 +287,7 @@ Database connection parameters are taken
 				</copy>
 			</then>
 			<else>
-				<copy file="${sql.dir}/umls/insert_view.sql" tofile="${java.io.tmpdir}/insert_view.template.sql"
overwrite="yes"/>
+				<copy file="${sql.dir}/umls/insert_view.sql" tofile="${java.io.tmpdir}/insert_view.template.sql"
overwrite="yes" />
 			</else>
 		</if>
 		<antcall target="jdbc.sqlcmd">
@@ -341,8 +349,8 @@ Database connection parameters are taken
 		<property name="sql.catalog" value="${db.name}" />
 		<property name="sql.schema" value="${db.schema}" />
 		<property name="sql.file" value="${sql.dir}/${sqlcmd.dir}/${sqlcmd.script}" />
-		<tempfile property="sql.src" suffix=".sql"  destdir="${java.io.tmpdir}" />
-		<tempfile property="use.sql.file" suffix="use.sql"  destdir="${java.io.tmpdir}" />
+		<tempfile property="sql.src" suffix=".sql" destdir="${java.io.tmpdir}" />
+		<tempfile property="use.sql.file" suffix="use.sql" destdir="${java.io.tmpdir}" />
 		<echo>execute ${sql.file}</echo>
 		<!-- <property name="sql.src" value="${java.io.tmpdir}/${sqlcmd.script}" /> -->
 		<if>
@@ -413,7 +421,7 @@ ${sql.delimiter}					
 		<echo>jdl.format ${jdl.format}</echo>
 		<echo>jdl.data ${jdl.data}</echo>
 		<echo>umls.prefix ${umls.prefix}</echo>
-		<tempfile property="jdl.format.file" suffix=".xml" deleteonexit="true" destdir="${java.io.tmpdir}"/>
+		<tempfile property="jdl.format.file" suffix=".xml" deleteonexit="true" destdir="${java.io.tmpdir}"
/>
 		<copy file="${jdl.format}" tofile="${jdl.format.file}" overwrite="true">
 			<filterset>
 				<filter token="umls.prefix" value="${umls.prefix}" />

Modified: ctakes/branches/ytex/ctakes-ytex/scripts/data/umls/v_snomed_fword_lookup.txt
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/umls/v_snomed_fword_lookup.txt?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex/scripts/data/umls/v_snomed_fword_lookup.txt (original)
+++ ctakes/branches/ytex/ctakes-ytex/scripts/data/umls/v_snomed_fword_lookup.txt Fri Jan 
3 05:53:02 2014
@@ -2728,3 +2728,6 @@ C2609129	T047	autoimmune		Autoimmune pan
 C2728259	T121	program		Program	
 C2946261	T121	level		Level	
 C2948600	T121	aim		Aim	
+C2948600	T121	aim		Aim "	
+C0011649	T191	dermoid		Dermoid cyst - RETIRED -	
+C0011649	T191	"		" Dermoid " tumor ( morphologic abnormality )	

Modified: ctakes/branches/ytex/ctakes-ytex/src/main/java/org/apache/ctakes/jdl/data/loader/CsvLoader.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/src/main/java/org/apache/ctakes/jdl/data/loader/CsvLoader.java?rev=1555011&r1=1555010&r2=1555011&view=diff
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex/src/main/java/org/apache/ctakes/jdl/data/loader/CsvLoader.java
(original)
+++ ctakes/branches/ytex/ctakes-ytex/src/main/java/org/apache/ctakes/jdl/data/loader/CsvLoader.java
Fri Jan  3 05:53:02 2014
@@ -14,7 +14,6 @@ import java.text.Format;
 import java.util.HashMap;
 import java.util.Map;
 
-
 import org.apache.commons.csv.CSVParser;
 import org.apache.commons.csv.CSVStrategy;
 import org.apache.commons.lang.BooleanUtils;
@@ -55,13 +54,13 @@ public class CsvLoader extends Loader {
 			throws FileNotFoundException {
 		InputStream inputStrem = new FileInputStream(file);
 		Reader reader = new InputStreamReader(inputStrem);
-		CSVStrategy strategy = CSVStrategy.DEFAULT_STRATEGY;
-		strategy.setDelimiter(CharUtils.toChar(loader.getDelimiter()));
-		if (loader.getEncapsulator() == null
-				|| loader.getEncapsulator().length() == 0)
-			strategy.setEncapsulator(DISABLED);
-		else
-			strategy.setEncapsulator(CharUtils.toChar(loader.getEncapsulator()));
+		char delimiter = CharUtils.toChar(loader.getDelimiter());
+		char encapsulator = (loader.getEncapsulator() == null || loader
+				.getEncapsulator().length() == 0) ? CSVStrategy.ENCAPSULATOR_DISABLED
+				: CharUtils.toChar(loader.getEncapsulator());
+		log.info(String.format("delimiter %d encapsulator %d", (int)delimiter, (int)encapsulator));
+		CSVStrategy strategy = new CSVStrategy(delimiter, encapsulator, CSVStrategy.COMMENTS_DISABLED,
+				CSVStrategy.ESCAPE_DISABLED, true, true, false, true);
 		parser = new CSVParser(reader, strategy);
 		this.loader = loader;
 		formatMap = new HashMap<String, Format>();
@@ -105,7 +104,7 @@ public class CsvLoader extends Loader {
 	@Override
 	public final void dataInsert(final JdlConnection jdlConnection) {
 		String sql = getSqlInsert(loader);
-		if(log.isInfoEnabled())
+		if (log.isInfoEnabled())
 			log.info(sql);
 		Number ncommit = loader.getCommit();
 		int rs = (loader.getSkip() == null) ? 0 : loader.getSkip().intValue();



Mime
View raw message