opennlp.tools.postag
Class POSSampleEventStream
java.lang.Object
opennlp.model.AbstractEventStream
opennlp.tools.util.AbstractEventStream<POSSample>
opennlp.tools.postag.POSSampleEventStream
- All Implemented Interfaces:
- EventStream
public class POSSampleEventStream
- extends AbstractEventStream<POSSample>
This class reads the POSSample
s from the given Iterator
and converts the POSSample
s into Event
s which
can be used by the maxent library for training.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POSSampleEventStream
public POSSampleEventStream(ObjectStream<POSSample> samples,
POSContextGenerator cg)
- Initializes the current instance with the given samples and the
given
POSContextGenerator
.
- Parameters:
samples
- cg
-
POSSampleEventStream
public POSSampleEventStream(ObjectStream<POSSample> samples)
- Initializes the current instance with given samples
and a
DefaultPOSContextGenerator
.
- Parameters:
samples
-
generateEvents
public static java.util.List<Event> generateEvents(java.lang.String[] sentence,
java.lang.String[] tags,
POSContextGenerator cg)
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.