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
ConstructorDescriptionBratNameSampleStream
(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples) Creates a newBratNameSampleStream
.BratNameSampleStream
(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream
.BratNameSampleStream
(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples) Creates a newBratNameSampleStream
.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
read
Methods inherited from class opennlp.tools.util.FilterObjectStream
close, reset
-
Constructor Details
-
BratNameSampleStream
public BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples) Creates a newBratNameSampleStream
.- Parameters:
sentDetector
- aSentenceDetector
instancetokenizer
- aTokenizer
instancesamples
- aBratDocument
ObjectStream
-
BratNameSampleStream
public BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples) Creates a newBratNameSampleStream
.- Parameters:
sentModel
- aSentenceModel
modeltokenModel
- aTokenizerModel
modelsamples
- aBratDocument
ObjectStream
-
BratNameSampleStream
public BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream
.- Parameters:
sentDetector
- aSentenceDetector
instancetokenizer
- aTokenizer
instancesamples
- aBratDocument
ObjectStream
nameTypes
- the name types to use or null if all name types
-
BratNameSampleStream
public BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples, Set<String> nameTypes) Creates a newBratNameSampleStream
.- Parameters:
sentModel
- aSentenceModel
modeltokenModel
- aTokenizerModel
modelsamples
- aBratDocument
ObjectStream
nameTypes
- the name types to use or null if all name types
-