public class POSSampleEventStream extends AbstractEventStream<POSSample>
Constructor and Description |
---|
POSSampleEventStream(ObjectStream<POSSample> samples)
Initializes the current instance with given samples
and a
DefaultPOSContextGenerator . |
POSSampleEventStream(ObjectStream<POSSample> samples,
POSContextGenerator cg)
Initializes the current instance with the given samples and the
given
POSContextGenerator . |
Modifier and Type | Method and Description |
---|---|
protected Iterator<Event> |
createEvents(POSSample sample)
Creates events for the provided sample.
|
static List<Event> |
generateEvents(String[] sentence,
String[] tags,
Object[] additionalContext,
POSContextGenerator cg) |
static List<Event> |
generateEvents(String[] sentence,
String[] tags,
POSContextGenerator cg) |
hasNext, next
remove
public POSSampleEventStream(ObjectStream<POSSample> samples, POSContextGenerator cg)
POSContextGenerator
.samples
- cg
- public POSSampleEventStream(ObjectStream<POSSample> samples)
DefaultPOSContextGenerator
.samples
- protected Iterator<Event> createEvents(POSSample sample)
AbstractEventStream
createEvents
in class AbstractEventStream<POSSample>
sample
- the sample for which training Event
s
are be created.Iterator
of training events or
an empty Iterator
.public static List<Event> generateEvents(String[] sentence, String[] tags, Object[] additionalContext, POSContextGenerator cg)
public static List<Event> generateEvents(String[] sentence, String[] tags, POSContextGenerator cg)
Copyright © 2015 The Apache Software Foundation. All rights reserved.