Class POSSampleEventStream
java.lang.Object
opennlp.tools.util.AbstractEventStream<opennlp.tools.postag.POSSample>
opennlp.tools.postag.POSSampleEventStream
- All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event>
Reads the
samples from an Iterator
and converts those samples into events which
can be used by the maxent library for training.-
Constructor Summary
ConstructorsConstructorDescriptionPOSSampleEventStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> samples) Initializes the current instance with given samples and aDefaultPOSContextGenerator.POSSampleEventStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> samples, opennlp.tools.postag.POSContextGenerator cg) Initializes the current instance with the given samples and aPOSContextGenerator. -
Method Summary
Modifier and TypeMethodDescriptionstatic List<opennlp.tools.ml.model.Event> generateEvents(String[] sentence, String[] tags, Object[] additionalContext, opennlp.tools.postag.POSContextGenerator cg) static List<opennlp.tools.ml.model.Event> generateEvents(String[] sentence, String[] tags, opennlp.tools.postag.POSContextGenerator cg) Methods inherited from class AbstractEventStream
close, read, reset
-
Constructor Details
-
POSSampleEventStream
public POSSampleEventStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> samples, opennlp.tools.postag.POSContextGenerator cg) Initializes the current instance with the given samples and aPOSContextGenerator.- Parameters:
samples- The data stream for this event stream.cg- APOSContextGeneratorto process the event streamsamples.
-
POSSampleEventStream
public POSSampleEventStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> samples) Initializes the current instance with given samples and aDefaultPOSContextGenerator.- Parameters:
samples- The data stream for this event stream.
-
-
Method Details
-
generateEvents
-
generateEvents
-