Package opennlp.tools.formats.brat
Class BratNameSampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<S,T>
opennlp.tools.formats.brat.SegmenterObjectStream<BratDocument,NameSample>
opennlp.tools.formats.brat.BratNameSampleStream
- All Implemented Interfaces:
AutoCloseable,ObjectStream<NameSample>
Generates Name Sample objects for a Brat Document object.
-
Constructor Summary
ConstructorsConstructorDescriptionBratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples) Initializes a newBratNameSampleStreamwith the specified parameters based on a straem ofdocuments.BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream.BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples) Initializes a newBratNameSampleStreamwith the specified (model) parameters.BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream. -
Method Summary
Methods inherited from class opennlp.tools.formats.brat.SegmenterObjectStream
readMethods inherited from class opennlp.tools.util.FilterObjectStream
close, reset
-
Constructor Details
-
BratNameSampleStream
public BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples) Initializes a newBratNameSampleStreamwith the specified parameters based on a straem ofdocuments.- Parameters:
sentDetector- A validSentenceDetectorinstance.tokenizer- A validTokenizerinstance.samples- TheBratDocumentObjectStreamto process.
-
BratNameSampleStream
public BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples) Initializes a newBratNameSampleStreamwith the specified (model) parameters.- Parameters:
sentModel- A validsentence detection model.tokenModel- A validtokenizer model.samples- TheBratDocumentObjectStreamto process.
-
BratNameSampleStream
public BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream.- Parameters:
sentDetector- A validSentenceDetectorinstance.tokenizer- A validTokenizerinstance.samples- TheBratDocumentObjectStreamto process.nameTypes- the name types to use ornullif all name types.
-
BratNameSampleStream
public BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream.- Parameters:
sentModel- aSentenceModelmodeltokenModel- aTokenizerModelmodelsamples- aBratDocumentObjectStreamnameTypes- the name types to use ornullif all name types
-