mawiesne commented on code in PR #59:
URL: https://github.com/apache/opennlp-sandbox/pull/59#discussion_r1081516840


##########
opennlp-wsd/src/main/java/opennlp/tools/cmdline/disambiguator/DisambiguatorTool.java:
##########
@@ -117,11 +120,12 @@ static ObjectStream<WSDSample> openSampleData(String 
sampleDataName,
       File sampleDataFile, Charset encoding) {
     CmdLineUtil.checkInputFile(sampleDataName + " Data", sampleDataFile);
 
-    FileInputStream sampleDataIn = CmdLineUtil.openInFile(sampleDataFile);
-
-    ObjectStream<String> lineStream = new PlainTextByLineStream(
-        sampleDataIn.getChannel(), encoding);
-
-    return new WSDSampleStream(lineStream);
+    try {
+      MarkableFileInputStreamFactory factory = new 
MarkableFileInputStreamFactory(sampleDataFile);
+      ObjectStream<String> lineStream = new ParagraphStream(new 
PlainTextByLineStream(factory, encoding));

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to