Package opennlp.tools.doccat
Class DocumentCategorizerEventStream
java.lang.Object
opennlp.tools.util.AbstractEventStream<DocumentSample>
opennlp.tools.doccat.DocumentCategorizerEventStream
- All Implemented Interfaces:
AutoCloseable
,ObjectStream<Event>
Iterator-like class for modeling document classification events.
-
Constructor Summary
ConstructorDescriptionInitializes aDocumentCategorizerEventStream
via samples.DocumentCategorizerEventStream
(ObjectStream<DocumentSample> samples, FeatureGenerator... featureGenerators) Initializes aDocumentCategorizerEventStream
via samples andfeature generators
. -
Method Summary
Methods inherited from class opennlp.tools.util.AbstractEventStream
close, read, reset
-
Constructor Details
-
DocumentCategorizerEventStream
public DocumentCategorizerEventStream(ObjectStream<DocumentSample> samples, FeatureGenerator... featureGenerators) Initializes aDocumentCategorizerEventStream
via samples andfeature generators
.- Parameters:
samples
-ObjectStream
ofsamples
.featureGenerators
- One or moreFeatureGenerator
to use.
-
DocumentCategorizerEventStream
Initializes aDocumentCategorizerEventStream
via samples.BagOfWordsFeatureGenerator
is used as feature generator.- Parameters:
samples
-ObjectStream
ofsamples
.
-