You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Phillip Rhodes (Jira)" <ji...@apache.org> on 2021/11/24 00:19:00 UTC

[jira] [Updated] (OPENNLP-1346) CLONE - The Training API code for Tokenization is outdated in manual

     [ https://issues.apache.org/jira/browse/OPENNLP-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phillip Rhodes updated OPENNLP-1346:
------------------------------------
    Description: 
The Training API example code at [https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html] in the section dealing with Tokenizer training  incorrect. The current code sample is:
{code:java}
ObjectStream<String> lineStream = new PlainTextByLineStream(new FileInputStream("en-sent.train"),
    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 and OPENNLP-1345

 

  was:
The Training API example code at [https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html] is incorrect. The current code sample is:
{code:java}
ObjectStream<String> lineStream =
  new PlainTextByLineStream(new FileInputStream("en-sent.train"), 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


> CLONE - The Training API code for Tokenization is outdated in manual
> --------------------------------------------------------------------
>
>                 Key: OPENNLP-1346
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1346
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.9.4
>            Reporter: Phillip Rhodes
>            Priority: Minor
>              Labels: documentation, easy-fix
>
> The Training API example code at [https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html] in the section dealing with Tokenizer training  incorrect. The current code sample is:
> {code:java}
> ObjectStream<String> lineStream = new PlainTextByLineStream(new FileInputStream("en-sent.train"),
>     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 and OPENNLP-1345
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)