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