public class SequenceLabelerEventStream extends opennlp.tools.util.AbstractEventStream<SequenceLabelSample>
| Constructor and Description |
|---|
SequenceLabelerEventStream(opennlp.tools.util.ObjectStream<SequenceLabelSample> dataStream) |
SequenceLabelerEventStream(opennlp.tools.util.ObjectStream<SequenceLabelSample> dataStream,
SequenceLabelerContextGenerator contextGenerator,
SequenceLabelerCodec<String> codec)
Creates a new name finder event stream using the specified data stream and
context generator.
|
| Modifier and Type | Method and Description |
|---|---|
static String[][] |
additionalContext(String[] tokens,
Map<String,String> prevMap)
Generated previous decision features for each token based on contents of
the specified map.
|
protected Iterator<opennlp.tools.ml.model.Event> |
createEvents(SequenceLabelSample sample) |
static List<opennlp.tools.ml.model.Event> |
generateEvents(String[] sentence,
String[] outcomes,
SequenceLabelerContextGenerator cg) |
public SequenceLabelerEventStream(opennlp.tools.util.ObjectStream<SequenceLabelSample> dataStream, SequenceLabelerContextGenerator contextGenerator, SequenceLabelerCodec<String> codec)
dataStream - The data stream of events.contextGenerator - The context generator used to generate features for the event
stream.codec - the encodingpublic SequenceLabelerEventStream(opennlp.tools.util.ObjectStream<SequenceLabelSample> dataStream)
public static List<opennlp.tools.ml.model.Event> generateEvents(String[] sentence, String[] outcomes, SequenceLabelerContextGenerator cg)
protected Iterator<opennlp.tools.ml.model.Event> createEvents(SequenceLabelSample sample)
createEvents in class opennlp.tools.util.AbstractEventStream<SequenceLabelSample>public static String[][] additionalContext(String[] tokens, Map<String,String> prevMap)
tokens - The token for which the context is generated.prevMap - A mapping of tokens to their previous decisions.Copyright © 2017 IXA pipes. All rights reserved.