incubator-ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1394275 - in /incubator/ctakes/trunk: ctakes-clinical-pipeline/resources/launch/ ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ ctakes-pos-tagger/desc/
Date Thu, 04 Oct 2012 21:24:09 GMT
Author: chenpei
Date: Thu Oct  4 21:24:08 2012
New Revision: 1394275

URL: http://svn.apache.org/viewvc?rev=1394275&view=rev
Log:
Updated POSTagger.xml to use the fully qualified paths to resources.
Updated the DependencyParserAE's to use this.getClass().getClassLoader().getResource() instead
of class.getResource() otherwise the paths will be relative to the specific class.

Modified:
    incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/CVD cTAKES.launch
    incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/UIMA_CVD--clinical_documents_pipeline.launch
    incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserDependencyParserAE.java
    incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserSemanticRoleLabelerAE.java
    incubator/ctakes/trunk/ctakes-pos-tagger/desc/POSTagger.xml
    incubator/ctakes/trunk/ctakes-pos-tagger/desc/SentenceDetectorAnnotator.xml

Modified: incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/CVD cTAKES.launch
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/CVD%20cTAKES.launch?rev=1394275&r1=1394274&r2=1394275&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/CVD cTAKES.launch (original)
+++ incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/CVD cTAKES.launch Thu
Oct  4 21:24:08 2012
@@ -1,15 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/ctakes-clinical-pipeline/lib/uima-tools.jar"/>
+<listEntry value="/ctakes-clinical-pipeline"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
+<listEntry value="4"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
 <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
 </listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.uima.tools.cvd.CVD"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ctakes-clinical-pipeline"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms1024M -Xmx2048M"/>
 </launchConfiguration>

Modified: incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/UIMA_CVD--clinical_documents_pipeline.launch
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/UIMA_CVD--clinical_documents_pipeline.launch?rev=1394275&r1=1394274&r2=1394275&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/UIMA_CVD--clinical_documents_pipeline.launch
(original)
+++ incubator/ctakes/trunk/ctakes-clinical-pipeline/resources/launch/UIMA_CVD--clinical_documents_pipeline.launch
Thu Oct  4 21:24:08 2012
@@ -9,31 +9,7 @@
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
 <stringAttribute key="org.eclipse.debug.ui.target_debug_perspective" value="perspective_default"/>
 <stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_default"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot;
path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
path=&quot;3&quot; projectName=&quot;ctakes-clinical-pipeline&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
containerPath=&quot;org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER&quot; path=&quot;3&quot;
type=&quot;4&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-dependency-parser/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-assertion/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-chunker/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-clinical-pipeline/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-constituency-parser/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-context-tokenizer/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-core/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-coreference/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-dictionary-lookup/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-drug-ner/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-lvg/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-ne-contexts/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-pad-term-spotter/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-pos-tagger/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-preprocessor/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-relation-extractor/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-side-effect/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry
internalArchive=&quot;/ctakes-smoking-status/resources&quot; path=&quot;3&quot;
type=&quot;2&quot;/&gt;&#13;&#10;"/>
-</listAttribute>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.uima.tools.annot_view.Gladis"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ctakes-clinical-pipeline"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>

Modified: incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserDependencyParserAE.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserDependencyParserAE.java?rev=1394275&r1=1394274&r2=1394275&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserDependencyParserAE.java
(original)
+++ incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserDependencyParserAE.java
Thu Oct  4 21:24:08 2012
@@ -33,6 +33,7 @@ import org.apache.log4j.Logger;
 import org.apache.uima.UimaContext;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.jcas.JCas;
+import org.apache.uima.resource.ResourceAccessException;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.uimafit.component.JCasAnnotator_ImplBase;
 import org.uimafit.descriptor.ConfigurationParameter;
@@ -128,16 +129,16 @@ public class ClearParserDependencyParser
 		try {
 			if (useLemmatizer) {
 				// Note: If lemmatizer data file is not specified, then use lemmas from the BaseToken
normalizedToken field.
-				// Initialize lemmatizer
-        URL lemmatizerDataFileURL = this.lemmatizerDataFile != null
-            ? this.lemmatizerDataFile.toURI().toURL()
-            : this.getClass().getResource(ENG_LEMMATIZER_DATA_FILE);
+				// Initialize lemmatizer
+        URL lemmatizerDataFileURL = this.lemmatizerDataFile == null
+            ? this.getClass().getClassLoader().getResource(ENG_LEMMATIZER_DATA_FILE)
+            : this.lemmatizerDataFile.toURI().toURL();
 				lemmatizer = new MorphEnAnalyzer(lemmatizerDataFileURL);
 			}
 
 			// Initialize parser
 			URL parserModelURL = this.parserModelFileName == null
-					? ClearParserDependencyParserAE.class.getResource(DEFAULT_MODEL_FILE_NAME)
+					? this.getClass().getClassLoader().getResource(DEFAULT_MODEL_FILE_NAME)
 					: new File(this.parserModelFileName).toURI().toURL();
 			parser = ClearParserUtil.createParser(parserModelURL.openStream(), parserAlgorithmName);
 		} catch (MalformedURLException e) {

Modified: incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserSemanticRoleLabelerAE.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserSemanticRoleLabelerAE.java?rev=1394275&r1=1394274&r2=1394275&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserSemanticRoleLabelerAE.java
(original)
+++ incubator/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearParserSemanticRoleLabelerAE.java
Thu Oct  4 21:24:08 2012
@@ -123,14 +123,14 @@ public class ClearParserSemanticRoleLabe
     		// Note: If lemmatizer data file is not specified, then use lemmas from the BaseToken
normalizedToken field.
     		// Initialize lemmatizer
         URL lemmatizerDataFileURL = this.lemmatizerDataFile != null
-            ? this.lemmatizerDataFile.toURI().toURL()
-            : this.getClass().getResource(ENG_LEMMATIZER_DATA_FILE);
+            ? this.getClass().getClassLoader().getResource(ENG_LEMMATIZER_DATA_FILE)
+            : this.lemmatizerDataFile.toURI().toURL();
     		lemmatizer = new MorphEnAnalyzer(new URL(lemmatizerDataFileURL.toString()));
     	}
 
     	// Initialize role labeler
     	URL parserModelURL = this.parserModelFileName == null
-    			? ClearParserSemanticRoleLabelerAE.class.getResource(DEFAULT_MODEL_FILE_NAME)
+    			? this.getClass().getClassLoader().getResource(DEFAULT_MODEL_FILE_NAME)
     			: new File(this.parserModelFileName).toURI().toURL();
     	parser = ClearParserUtil.createSRLParser(parserModelURL.openStream());
 

Modified: incubator/ctakes/trunk/ctakes-pos-tagger/desc/POSTagger.xml
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-pos-tagger/desc/POSTagger.xml?rev=1394275&r1=1394274&r2=1394275&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-pos-tagger/desc/POSTagger.xml (original)
+++ incubator/ctakes/trunk/ctakes-pos-tagger/desc/POSTagger.xml Thu Oct  4 21:24:08 2012
@@ -54,7 +54,7 @@
 <nameValuePair>
 <name>PosModelFile</name>
 <value>
-<string>models/mayo-pos.zip</string>
+<string>org/apache/ctakes/postagger/models/mayo-pos.zip</string>
 </value>
 </nameValuePair>
 <nameValuePair>
@@ -66,7 +66,7 @@
 <nameValuePair>
 <name>TagDictionary</name>
 <value>
-<string>models/tag.dictionary.txt</string>
+<string>org/apache/ctakes/postagger/models/tag.dictionary.txt</string>
 </value>
 </nameValuePair>
 </configurationParameterSettings>

Modified: incubator/ctakes/trunk/ctakes-pos-tagger/desc/SentenceDetectorAnnotator.xml
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-pos-tagger/desc/SentenceDetectorAnnotator.xml?rev=1394275&r1=1394274&r2=1394275&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-pos-tagger/desc/SentenceDetectorAnnotator.xml (original)
+++ incubator/ctakes/trunk/ctakes-pos-tagger/desc/SentenceDetectorAnnotator.xml Thu Oct  4
21:24:08 2012
@@ -64,7 +64,7 @@
 <name>MaxentModelFile</name>
 <description></description>
 <fileResourceSpecifier>
-<fileUrl>file:sentdetect/sample_sd_included.mod</fileUrl>
+<fileUrl>file:org/apache/ctakes/core/sentdetect/sample_sd_included.mod</fileUrl>
 </fileResourceSpecifier>
 <implementationName>org.apache.ctakes.core.resource.SuffixMaxentModelResourceImpl</implementationName>
 </externalResource>



Mime
View raw message