public class WordTagSampleStream extends FilterObjectStream<String,POSSample>
POSSample
objects.samples
Constructor and Description |
---|
WordTagSampleStream(ObjectStream<String> sentences) |
WordTagSampleStream(Reader sentences)
Initializes the current instance.
|
Modifier and Type | Method and Description |
---|---|
POSSample |
read()
Parses the next sentence and return the next
POSSample object. |
close, reset
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
Copyright © 2016 The Apache Software Foundation. All rights reserved.