You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2011/07/11 14:21:35 UTC
svn commit: r1145139 -
/incubator/opennlp/trunk/opennlp-docs/src/docbkx/sentdetect.xml
Author: joern
Date: Mon Jul 11 12:21:35 2011
New Revision: 1145139
URL: http://svn.apache.org/viewvc?rev=1145139&view=rev
Log:
OPENNLP-115 Charset should be specified before creating input stream
Modified:
incubator/opennlp/trunk/opennlp-docs/src/docbkx/sentdetect.xml
Modified: incubator/opennlp/trunk/opennlp-docs/src/docbkx/sentdetect.xml
URL: http://svn.apache.org/viewvc/incubator/opennlp/trunk/opennlp-docs/src/docbkx/sentdetect.xml?rev=1145139&r1=1145138&r2=1145139&view=diff
==============================================================================
--- incubator/opennlp/trunk/opennlp-docs/src/docbkx/sentdetect.xml (original)
+++ incubator/opennlp/trunk/opennlp-docs/src/docbkx/sentdetect.xml Mon Jul 11 12:21:35 2011
@@ -199,8 +199,9 @@ Path: en-sent.bin
The following sample code illustrates these steps:
<programlisting language="java">
<![CDATA[
+Charset charset = Charset.forName("UTF-8");
ObjectStream<String> lineStream = new PlainTextByLineStream(new FileInputStream("en-sent.train"),
- Charset.forName("UTF-8"));
+ charset);
ObjectStream<SentenceSample> sampleStream = new SentenceSampleStream(lineStream);
SentenceModel model;