You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by ma...@apache.org on 2014/02/08 19:50:36 UTC

svn commit: r1566095 - /opennlp/addons/geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/GeoEntityLinkerSetupUtils.java

Author: markg
Date: Sat Feb  8 18:50:36 2014
New Revision: 1566095

URL: http://svn.apache.org/r1566095
Log:
OPENNLP-615
Fixed doccat training portion due to recent changes using inputStreamFactory

Modified:
    opennlp/addons/geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/GeoEntityLinkerSetupUtils.java

Modified: opennlp/addons/geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/GeoEntityLinkerSetupUtils.java
URL: http://svn.apache.org/viewvc/opennlp/addons/geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/GeoEntityLinkerSetupUtils.java?rev=1566095&r1=1566094&r2=1566095&view=diff
==============================================================================
--- opennlp/addons/geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/GeoEntityLinkerSetupUtils.java (original)
+++ opennlp/addons/geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/GeoEntityLinkerSetupUtils.java Sat Feb  8 18:50:36 2014
@@ -39,7 +39,7 @@ import static opennlp.addons.geoentityli
 import opennlp.tools.cmdline.MarkableFileInputStreamFactory;
 import opennlp.tools.ml.model.DataIndexer;
 import opennlp.tools.util.InputStreamFactory;
-import opennlp.tools.util.MockInputStreamFactory;
+
 
 /**
  *
@@ -112,7 +112,7 @@ public class GeoEntityLinkerSetupUtils {
     try {
 
     
-      ObjectStream<String> lineStream = new PlainTextByLineStream(new MockInputStreamFactory(dataIn), "UTF-8");
+      ObjectStream<String> lineStream = new PlainTextByLineStream(new MarkableFileInputStreamFactory(annotationOutFile), "UTF-8");
       ObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(lineStream);
 
       model = DocumentCategorizerME.train("en", sampleStream);