Package opennlp.tools.formats.masc
Klasse MascSentenceSampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument,SentenceSample>
opennlp.tools.formats.masc.MascSentenceSampleStream
- Alle implementierten Schnittstellen:
AutoCloseable,ObjectStream<SentenceSample>
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungMascSentenceSampleStream(ObjectStream<MascDocument> samples, int sentencesPerSample) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungread()Reads a newsample of sentences.voidreset()Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly.Von Klasse geerbte Methoden opennlp.tools.util.FilterObjectStream
close
-
Konstruktordetails
-
MascSentenceSampleStream
public MascSentenceSampleStream(ObjectStream<MascDocument> samples, int sentencesPerSample) throws IOException - Löst aus:
IOException
-
-
Methodendetails
-
read
Reads a newsample of sentences.- Gibt zurück:
- The
specified number of sentences. If fewer left, then return whatever is left. - Löst aus:
IOException- Thrown if IO errors occurred during read operation.
-
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<SentenceSample>- Setzt außer Kraft:
resetin KlasseFilterObjectStream<MascDocument,SentenceSample> - 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.
-