public class TokSpanEventStream extends AbstractEventStream<TokenSample>
TokenSamples from the given Iterator
and converts the TokenSamples into Events which
can be used by the maxent library for training.| Constructor and Description |
|---|
TokSpanEventStream(ObjectStream<TokenSample> tokenSamples,
boolean skipAlphaNumerics)
Initializes the current instance.
|
TokSpanEventStream(ObjectStream<TokenSample> tokenSamples,
boolean skipAlphaNumerics,
Pattern alphaNumeric,
TokenContextGenerator cg)
Initializes the current instance.
|
TokSpanEventStream(ObjectStream<TokenSample> tokenSamples,
boolean skipAlphaNumerics,
TokenContextGenerator cg)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected Iterator<Event> |
createEvents(TokenSample tokenSample)
Adds training events to the event stream for each of the specified tokens.
|
hasNext, nextremovepublic TokSpanEventStream(ObjectStream<TokenSample> tokenSamples, boolean skipAlphaNumerics, Pattern alphaNumeric, TokenContextGenerator cg)
tokenSamples - skipAlphaNumerics - cg - public TokSpanEventStream(ObjectStream<TokenSample> tokenSamples, boolean skipAlphaNumerics, TokenContextGenerator cg)
tokenSamples - skipAlphaNumerics - cg - public TokSpanEventStream(ObjectStream<TokenSample> tokenSamples, boolean skipAlphaNumerics)
tokenSamples - skipAlphaNumerics - protected Iterator<Event> createEvents(TokenSample tokenSample)
createEvents in class AbstractEventStream<TokenSample>tokens - character offsets into the specified text.text - The text of the tokens.Iterator of training events or
an empty Iterator.Copyright © 2019 The Apache Software Foundation. All rights reserved.