Package opennlp.tools.formats.masc
Klasse MascPOSSampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument,POSSample>
opennlp.tools.formats.masc.MascPOSSampleStream
- Alle implementierten Schnittstellen:
AutoCloseable,ObjectStream<POSSample>
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungMascPOSSampleStream(ObjectStream<MascDocument> samples) InitializesMascPOSSampleStreamfrom a stream ofdocuments. -
Methodenübersicht
Von Klasse geerbte Methoden opennlp.tools.util.FilterObjectStream
close
-
Konstruktordetails
-
MascPOSSampleStream
InitializesMascPOSSampleStreamfrom a stream ofdocuments.- Parameter:
samples- AObjectStream<MascDocument>of samples.- Löst aus:
IOException- Thrown if none of the documents has POS tags.
-
-
Methodendetails
-
read
Reads the next sample.- Gibt zurück:
- One
sentence together with its POS tags. - Löst aus:
IOException- Thrown if the sample cannot be extracted.
-
reset
Beschreibung aus Schnittstelle kopiert:ObjectStreamRepositions the stream at the beginning and the previously seen object sequence will be repeated exactly. This method can be used to re-read the stream if multiple passes over the objects are required.The implementation of this method is optional.
- Angegeben von:
resetin SchnittstelleObjectStream<POSSample>- Setzt außer Kraft:
resetin KlasseFilterObjectStream<MascDocument,POSSample> - Löst aus:
IOException- Thrown if there is an error during resetting the stream.UnsupportedOperationException- Thrown if thereset()is not supported. By default, this is the case.
-