public class WordTagSampleStream extends FilterObjectStream<String,POSSample>
POSSample
objects.Constructor and Description |
---|
WordTagSampleStream(ObjectStream<String> sentences) |
WordTagSampleStream(Reader sentences)
Initializes the current instance.
|
public WordTagSampleStream(Reader sentences) throws IOException
sentences
- reader with sentencesIOException
- IOExceptionpublic WordTagSampleStream(ObjectStream<String> sentences)
public POSSample read() throws IOException
POSSample
object.
If an error occurs an empty POSSample
object is returned
and an warning message is logged. Usually it does not matter if one
of many sentences is ignored.
TODO: An exception in error case should be thrown.IOException
- if there is an error during readingCopyright © 2015 The Apache Software Foundation. All rights reserved.