ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevenbeth...@apache.org
Subject svn commit: r1490800 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/THYMETreebankReader.java
Date Fri, 07 Jun 2013 19:49:04 GMT
Author: stevenbethard
Date: Fri Jun  7 19:49:04 2013
New Revision: 1490800

URL: http://svn.apache.org/r1490800
Log:
Fixes warnings in THYME treebank reader.

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/THYMETreebankReader.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/THYMETreebankReader.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/THYMETreebankReader.java?rev=1490800&r1=1490799&r2=1490800&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/THYMETreebankReader.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/THYMETreebankReader.java
Fri Jun  7 19:49:04 2013
@@ -40,15 +40,16 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.cas.FSArray;
+import org.apache.uima.jcas.cas.StringArray;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.FileUtils;
 import org.apache.uima.util.Level;
-import org.cleartk.syntax.constituent.util.TreebankFormatParser;
-import org.cleartk.util.UIMAUtil;
+import org.cleartk.corpus.penntreebank.TreebankFormatParser;
 import org.cleartk.util.ViewURIUtil;
 import org.uimafit.component.JCasAnnotator_ImplBase;
 import org.uimafit.descriptor.ConfigurationParameter;
 import org.uimafit.factory.AnalysisEngineFactory;
+import org.uimafit.util.FSCollectionFactory;
 import org.uimafit.util.JCasUtil;
 
 public class THYMETreebankReader extends JCasAnnotator_ImplBase {
@@ -211,7 +212,8 @@ public class THYMETreebankReader extends
 			TreebankNode uimaNode,
 			TreebankNode parentNode) {
 		uimaNode.setNodeType(pojoNode.getType());
-		uimaNode.setNodeTags(UIMAUtil.toStringArray(jCas, pojoNode.getTags()));
+		uimaNode.setNodeTags(new StringArray(jCas, pojoNode.getTags().length));
+		FSCollectionFactory.fillArrayFS(uimaNode.getNodeTags(), pojoNode.getTags());
 		uimaNode.setNodeValue(pojoNode.getValue());
 		uimaNode.setLeaf(pojoNode.isLeaf());
 		uimaNode.setParent(parentNode);



Mime
View raw message