Package opennlp.tools.postag
Klasse WordTagSampleStream
- Alle implementierten Schnittstellen:
AutoCloseable,ObjectStream<POSSample>
A stream filter which reads a sentence per line which contains
words and tags in
word_tag format and outputs a POSSample objects.-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungWordTagSampleStream(ObjectStream<String> sentences) Initializes aPOSSampleinstance. -
Methodenübersicht
Von Klasse geerbte Methoden opennlp.tools.util.FilterObjectStream
close, reset
-
Konstruktordetails
-
Methodendetails
-
read
Parses the next sentence and return the nextPOSSampleobject.If an error occurs an empty
POSSampleobject is returned and a warning message is logged. Usually it does not matter if one or many sentences are ignored.- Gibt zurück:
- A valid
POSSampleornullif thesentence streamis exhausted. - Löst aus:
IOException- Thrown if IO errors occurred during read.
-