You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/22 15:41:00 UTC

[jira] [Commented] (OPENNLP-1319) The Training API code is outdated in Manual

    [ https://issues.apache.org/jira/browse/OPENNLP-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510703#comment-17510703 ] 

ASF GitHub Bot commented on OPENNLP-1319:
-----------------------------------------

jzonthemtn merged pull request #386:
URL: https://github.com/apache/opennlp/pull/386


   


-- 
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-unsubscribe@opennlp.apache.org

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


> The Training API code is outdated in Manual
> -------------------------------------------
>
>                 Key: OPENNLP-1319
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1319
>             Project: OpenNLP
>          Issue Type: Documentation
>            Reporter: Alan Wang
>            Priority: Major
>
>  {code:java}
> POSModel model = null;
> try (InputStream dataIn = new FileInputStream("en-pos.train")){
>   ObjectStream<String> lineStream = new PlainTextByLineStream(dataIn, StandardCharsets.UTF_8);
>   ObjectStream<POSSample> sampleStream = new WordTagSampleStream(lineStream);
>   model = POSTaggerME.train("en", sampleStream, TrainingParameters.defaultParams(), null, null);
> }
> {code}
> 1、PlainTextByLineStream use InputStreamFactory now.
> 2、Update parameters of the train method.



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