Class MascSentenceSampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument, opennlp.tools.sentdetect.SentenceSample>
opennlp.tools.formats.masc.MascSentenceSampleStream
- All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample>
public class MascSentenceSampleStream
extends opennlp.tools.util.FilterObjectStream<MascDocument, opennlp.tools.sentdetect.SentenceSample>
-
Constructor Summary
ConstructorsConstructorDescriptionMascSentenceSampleStream(opennlp.tools.util.ObjectStream<MascDocument> samples, int sentencesPerSample) -
Method Summary
Methods inherited from class opennlp.tools.util.FilterObjectStream
close
-
Constructor Details
-
MascSentenceSampleStream
public MascSentenceSampleStream(opennlp.tools.util.ObjectStream<MascDocument> samples, int sentencesPerSample) throws IOException - Throws:
IOException
-
-
Method Details
-
read
Reads a newsample of sentences.- Returns:
- The
specified number of sentences. If fewer left, then return whatever is left. - Throws:
IOException- Thrown if IO errors occurred during read operation.
-
reset
- Specified by:
resetin interfaceopennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample>- Overrides:
resetin classopennlp.tools.util.FilterObjectStream<MascDocument, opennlp.tools.sentdetect.SentenceSample>- Throws:
IOExceptionUnsupportedOperationException
-