opennlp.tools.postag
Class POSSampleEventStream
java.lang.Object
opennlp.model.AbstractEventStream
opennlp.tools.util.AbstractEventStream<POSSample>
opennlp.tools.postag.POSSampleEventStream
- All Implemented Interfaces:
- opennlp.model.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 opennlp.model.AbstractEventStream |
remove |
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 List<opennlp.model.Event> generateEvents(String[] sentence,
String[] tags,
Object[] additionalContext,
POSContextGenerator cg)
generateEvents
public static List<opennlp.model.Event> generateEvents(String[] sentence,
String[] tags,
POSContextGenerator cg)
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.