public class NameFinderEventStream extends AbstractEventStream<NameSample>
| Constructor and Description | 
|---|
NameFinderEventStream(ObjectStream<NameSample> dataStream)  | 
NameFinderEventStream(ObjectStream<NameSample> dataStream,
                     String type,
                     NameContextGenerator contextGenerator,
                     SequenceCodec<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. 
 | 
static List<Event> | 
generateEvents(String[] sentence,
              String[] outcomes,
              NameContextGenerator cg)  | 
static String[] | 
generateOutcomes(Span[] names,
                String type,
                int length)
Deprecated. 
 
use the BioCodec implementation of the SequenceValidator instead! 
 | 
close, read, resetpublic NameFinderEventStream(ObjectStream<NameSample> dataStream, String type, NameContextGenerator contextGenerator, SequenceCodec<String> 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 String[] generateOutcomes(Span[] names, 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 List<Event> generateEvents(String[] sentence, String[] outcomes, NameContextGenerator cg)
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 The Apache Software Foundation. All rights reserved.