Package opennlp.tools.formats.masc
Class MascNamedEntitySampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument,NameSample>
 
opennlp.tools.formats.masc.MascNamedEntitySampleStream
- All Implemented Interfaces:
- AutoCloseable,- ObjectStream<NameSample>
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class opennlp.tools.util.FilterObjectStreamclose
- 
Constructor Details- 
MascNamedEntitySampleStreamInitializesMascNamedEntitySampleStreamfrom a stream ofdocuments.- Parameters:
- samples- A- ObjectStream<MascDocument>of samples.
- Throws:
- IOException- Thrown if none of the documents has NE labels.
 
 
- 
- 
Method Details- 
readReads the next sample of named entities.- Returns:
- One sentence together with its named entity annotation.
- Throws:
- IOException- Thrown if the sample cannot be extracted
 
- 
resetDescription copied from interface: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. - Specified by:
- resetin interface- ObjectStream<NameSample>
- Overrides:
- resetin class- FilterObjectStream<MascDocument,- NameSample> 
- Throws:
- IOException- Thrown if there is an error during resetting the stream.
- UnsupportedOperationException- Thrown if the- reset()is not supported. By default, this is the case.
 
 
-