|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopennlp.tools.namefind.NameFinderEventStream
public class NameFinderEventStream
Class for creating an event stream out of data files for training an name finder.
| Constructor Summary | |
|---|---|
NameFinderEventStream(NameSampleStream dataStream)
|
|
NameFinderEventStream(NameSampleStream dataStream,
NameContextGenerator contextGenerator)
Creates a new name finder event stream using the specified data stream and context generator. |
|
| Method Summary | |
|---|---|
static java.lang.String[][] |
additionalContext(java.lang.String[] tokens,
java.util.Map prevMap)
Generated previous decision features for each token based on contents of the specifed map. |
static java.lang.String[] |
generateOutcomes(Span[] names,
java.lang.String[] nameTypes,
int length)
Generates the name tag outcomes (start, continue, other) for each token in a sentence with the specified length using the specified name spans. |
boolean |
hasNext()
|
static void |
main(java.lang.String[] args)
|
opennlp.maxent.Event |
nextEvent()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NameFinderEventStream(NameSampleStream dataStream,
NameContextGenerator contextGenerator)
dataStream - The data stream of events.contextGenerator - The context generator used to generate features for the event stream.public NameFinderEventStream(NameSampleStream dataStream)
| Method Detail |
|---|
public static java.lang.String[] generateOutcomes(Span[] names,
java.lang.String[] nameTypes,
int length)
names - Token spans for each of the names.length - The length of the sentence.
public boolean hasNext()
hasNext in interface opennlp.maxent.EventStreampublic opennlp.maxent.Event nextEvent()
nextEvent in interface opennlp.maxent.EventStream
public static java.lang.String[][] additionalContext(java.lang.String[] tokens,
java.util.Map prevMap)
tokens - The token for which the context is generated.prevMap - A mapping of tokens to their previous decisions.
public static final void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||