[
https://issues.apache.org/jira/browse/OPENNLP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Wiesner resolved OPENNLP-1349.
-------------------------------------
Fix Version/s: 2.0.0
Assignee: Martin Wiesner
Resolution: Fixed
This is fixed with commit 6c4dc364 in the context of OPENNLP-1362.
Since the change, the documentation is consistent with the API again.
> The Training API code for Document Categorization is outdated in manual
> -----------------------------------------------------------------------
>
> Key: OPENNLP-1349
> URL: https://issues.apache.org/jira/browse/OPENNLP-1349
> Project: OpenNLP
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 1.9.4
> Reporter: Phillip Rhodes
> Assignee: Martin Wiesner
> Priority: Minor
> Labels: documentation, easy-fix
> Fix For: 2.0.0
>
>
> The Training API example code at
> [https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html] in the section
> dealing with TokenNameFinder training incorrect. The current code sample
> includes:
> {code:java}
> try (dataIn = new FileInputStream("en-sentiment.train")) {
> ObjectStream<String> lineStream =
> new PlainTextByLineStream(dataIn, StandardCharsets.UTF_8);
> }{code}
> But PlainTextByLineStream no longer takes an InputStream as the first
> argument to its constructor. It now requires an InputStreamFactory.
> NOTE: this same pattern reappears in multiple places in the current manual.
> See also, OPENNLP-1319, OPENNLP-1345, and OPENNLP-1346 among others.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)