opennlp.tools.doccat
Class DocumentCategorizerEventStream
java.lang.Object
opennlp.model.AbstractEventStream
opennlp.tools.util.AbstractEventStream<DocumentSample>
opennlp.tools.doccat.DocumentCategorizerEventStream
- All Implemented Interfaces:
- opennlp.model.EventStream
public class DocumentCategorizerEventStream
- extends AbstractEventStream<DocumentSample>
Iterator-like class for modeling document classification events.
Methods inherited from class opennlp.model.AbstractEventStream |
remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentCategorizerEventStream
public DocumentCategorizerEventStream(ObjectStream<DocumentSample> data,
FeatureGenerator... featureGenerators)
- Initializes the current instance.
- Parameters:
data
- ObjectStream
of DocumentSample
sfeatureGenerators
-
DocumentCategorizerEventStream
public DocumentCategorizerEventStream(ObjectStream<DocumentSample> samples)
- Initializes the current instance.
- Parameters:
samples
- ObjectStream
of DocumentSample
s
createEvents
protected Iterator<opennlp.model.Event> createEvents(DocumentSample sample)
- Description copied from class:
AbstractEventStream
- Creates events for the provided sample.
- Specified by:
createEvents
in class AbstractEventStream<DocumentSample>
- Parameters:
sample
- the sample for which training Event
s
are be created.
- Returns:
- an
Iterator
of training events or
an empty Iterator
.
Copyright © 2010. All Rights Reserved.