ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevenbeth...@apache.org
Subject svn commit: r1456840 [6/6] - in /incubator/ctakes/trunk/ctakes-relation-extractor: desc/analysis_engine/ src/main/java/org/apache/ctakes/relationextractor/pipelines/
Date Fri, 15 Mar 2013 09:47:14 GMT
Modified: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java?rev=1456840&r1=1456839&r2=1456840&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java
(original)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java
Fri Mar 15 09:47:14 2013
@@ -43,6 +43,7 @@ import org.kohsuke.args4j.Option;
 import org.uimafit.factory.AggregateBuilder;
 import org.uimafit.factory.AnalysisEngineFactory;
 import org.uimafit.factory.ConfigurationParameterFactory;
+import org.uimafit.factory.TypeSystemDescriptionFactory;
 import org.uimafit.testing.util.HideOutput;
 import org.xml.sax.SAXException;
 
@@ -232,7 +233,11 @@ public class RelationExtractorTrain {
 
   private static void writeDesc(File descDir, String name, AnalysisEngineDescription desc)
       throws SAXException, IOException {
+    // set the name (not done by uimaFIT)
     desc.getMetaData().setName(name);
+    // set the type system (uimaFIT expands all imports, so this simplifies the descriptor)
+    desc.getAnalysisEngineMetaData().setTypeSystem(TypeSystemDescriptionFactory.createTypeSystemDescription(
+        "org.apache.ctakes.typesystem.types.TypeSystem"));
     File descFile = new File(descDir, name + ".xml");
     System.out.println("writing description to " + descFile);
     FileOutputStream output = new FileOutputStream(descFile);



Mime
View raw message