public class NameFinderEventStream extends AbstractEventStream<NameSample>
Constructor and Description |
---|
NameFinderEventStream(ObjectStream<NameSample> dataStream) |
NameFinderEventStream(ObjectStream<NameSample> dataStream,
java.lang.String type,
NameContextGenerator contextGenerator,
SequenceCodec codec)
Creates a new name finder event stream using the specified data stream and context generator.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[][] |
additionalContext(java.lang.String[] tokens,
java.util.Map<java.lang.String,java.lang.String> prevMap)
Generated previous decision features for each token based on contents of the specified map.
|
static java.util.List<Event> |
generateEvents(java.lang.String[] sentence,
java.lang.String[] outcomes,
NameContextGenerator cg) |
static java.lang.String[] |
generateOutcomes(Span[] names,
java.lang.String type,
int length)
Deprecated.
use the BioCodec implementation of the SequenceValidator instead!
|
close, read, reset
public NameFinderEventStream(ObjectStream<NameSample> dataStream, java.lang.String type, NameContextGenerator contextGenerator, SequenceCodec codec)
dataStream
- The data stream of events.type
- null or overrides the type parameter in the provided samplescontextGenerator
- The context generator used to generate features for the event stream.public NameFinderEventStream(ObjectStream<NameSample> dataStream)
@Deprecated public static java.lang.String[] generateOutcomes(Span[] names, java.lang.String type, int length)
names
- Token spans for each of the names.type
- null or overrides the type parameter in the provided sampleslength
- The length of the sentence.public static java.util.List<Event> generateEvents(java.lang.String[] sentence, java.lang.String[] outcomes, NameContextGenerator cg)
public static java.lang.String[][] additionalContext(java.lang.String[] tokens, java.util.Map<java.lang.String,java.lang.String> prevMap)
tokens
- The token for which the context is generated.prevMap
- A mapping of tokens to their previous decisions.Copyright © 2010 - 2020 Adobe. All Rights Reserved