Package opennlp.tools.postag
Class POSSampleEventStream
- java.lang.Object
-
- opennlp.tools.util.AbstractEventStream<POSSample>
-
- opennlp.tools.postag.POSSampleEventStream
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,ObjectStream<Event>
public class POSSampleEventStream extends AbstractEventStream<POSSample>
-
-
Constructor Summary
Constructors Constructor Description POSSampleEventStream(ObjectStream<POSSample> samples)
Initializes the current instance with given samples and aDefaultPOSContextGenerator
.POSSampleEventStream(ObjectStream<POSSample> samples, POSContextGenerator cg)
Initializes the current instance with the given samples and the givenPOSContextGenerator
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<Event>
generateEvents(java.lang.String[] sentence, java.lang.String[] tags, java.lang.Object[] additionalContext, POSContextGenerator cg)
static java.util.List<Event>
generateEvents(java.lang.String[] sentence, java.lang.String[] tags, POSContextGenerator cg)
-
Methods inherited from class opennlp.tools.util.AbstractEventStream
close, read, reset
-
-
-
-
Constructor Detail
-
POSSampleEventStream
public POSSampleEventStream(ObjectStream<POSSample> samples, POSContextGenerator cg)
Initializes the current instance with the given samples and the givenPOSContextGenerator
.- Parameters:
samples
-cg
-
-
POSSampleEventStream
public POSSampleEventStream(ObjectStream<POSSample> samples)
Initializes the current instance with given samples and aDefaultPOSContextGenerator
.- Parameters:
samples
-
-
-
Method Detail
-
generateEvents
public static java.util.List<Event> generateEvents(java.lang.String[] sentence, java.lang.String[] tags, java.lang.Object[] additionalContext, POSContextGenerator cg)
-
generateEvents
public static java.util.List<Event> generateEvents(java.lang.String[] sentence, java.lang.String[] tags, POSContextGenerator cg)
-
-