You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jz...@apache.org on 2020/09/20 23:05:01 UTC

[opennlp] branch master updated: OPENNLP-1308 corrected (#378)

This is an automated email from the ASF dual-hosted git repository.

jzemerick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/opennlp.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ecc3ba  OPENNLP-1308 corrected (#378)
2ecc3ba is described below

commit 2ecc3ba0f40060cbebdedf71acbfad169b455a2b
Author: MikalaiD <Mi...@users.noreply.github.com>
AuthorDate: Mon Sep 21 01:04:52 2020 +0200

    OPENNLP-1308 corrected (#378)
---
 opennlp-docs/src/docbkx/namefinder.xml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/opennlp-docs/src/docbkx/namefinder.xml b/opennlp-docs/src/docbkx/namefinder.xml
index 1ad67de..e98dc49 100644
--- a/opennlp-docs/src/docbkx/namefinder.xml
+++ b/opennlp-docs/src/docbkx/namefinder.xml
@@ -273,11 +273,10 @@ ObjectStream<String> lineStream =
 TokenNameFinderModel model;
 
 try (ObjectStream<NameSample> sampleStream = new NameSampleDataStream(lineStream)) {
-  model = NameFinderME.train("en", "person", sampleStream, TrainingParameters.defaultParams(),
-            TokenNameFinderFactory nameFinderFactory);
+  model = NameFinderME.train("en", "person", sampleStream, TrainingParameters.defaultParams(), nameFinderFactory);
 }
 
-try (modelOut = new BufferedOutputStream(new FileOutputStream(modelFile)){
+try (ObjectStream modelOut = new BufferedOutputStream(new FileOutputStream(modelFile)){
   model.serialize(modelOut);
 }]]>
 			 </programlisting>