Class POSSampleEventStream
- All Implemented Interfaces:
AutoCloseable, ObjectStream<Event>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final POSContextGeneratorThePOSContextGeneratorused to create the trainingevents. -
Constructor Summary
ConstructorsConstructorDescriptionPOSSampleEventStream(ObjectStream<POSSample> samples) Initializes the current instance with given samples and aDefaultPOSContextGenerator.POSSampleEventStream(ObjectStream<POSSample> samples, POSContextGenerator cg) Initializes the current instance with the given samples and aPOSContextGenerator. -
Method Summary
Modifier and TypeMethodDescriptioncreateEvents(POSSample sample) Creates events for the providedsample.generateEvents(String[] sentence, String[] tags, Object[] additionalContext, POSContextGenerator cg) generateEvents(String[] sentence, String[] tags, POSContextGenerator cg) Methods inherited from class AbstractEventStream
close, read, reset
-
Field Details
-
cg
ThePOSContextGeneratorused to create the trainingevents.
-
-
Constructor Details
-
POSSampleEventStream
Initializes the current instance with the given samples and aPOSContextGenerator.- Parameters:
samples- The data stream for this event stream.cg- APOSContextGeneratorto process the event streamsamples.
-
POSSampleEventStream
Initializes the current instance with given samples and aDefaultPOSContextGenerator.- Parameters:
samples- The data stream for this event stream.
-
-
Method Details
-
createEvents
Description copied from class:AbstractEventStreamCreates events for the providedsample.- Specified by:
createEventsin classAbstractEventStream<POSSample>- Parameters:
sample- Thesamplefor which trainingeventsare created.- Returns:
- An
Iteratorof training events or an emptyIterator.
-
generateEvents
-
generateEvents
-