opennlp.tools.postag
Class POSSampleEventStream

java.lang.Object
  extended by opennlp.model.AbstractEventStream
      extended by opennlp.tools.util.AbstractEventStream<POSSample>
          extended by opennlp.tools.postag.POSSampleEventStream
All Implemented Interfaces:
opennlp.model.EventStream

public class POSSampleEventStream
extends AbstractEventStream<POSSample>

This class reads the POSSamples from the given Iterator and converts the POSSamples into Events which can be used by the maxent library for training.


Constructor Summary
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.
 
Method Summary
static List<opennlp.model.Event> generateEvents(String[] sentence, String[] tags, Object[] additionalContext, POSContextGenerator cg)
           
static List<opennlp.model.Event> generateEvents(String[] sentence, String[] tags, POSContextGenerator cg)
           
 
Methods inherited from class opennlp.tools.util.AbstractEventStream
hasNext, next
 
Methods inherited from class opennlp.model.AbstractEventStream
remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSSampleEventStream

public POSSampleEventStream(ObjectStream<POSSample> samples,
                            POSContextGenerator cg)
Initializes the current instance with the given samples and the given POSContextGenerator.

Parameters:
samples -
cg -

POSSampleEventStream

public POSSampleEventStream(ObjectStream<POSSample> samples)
Initializes the current instance with given samples and a DefaultPOSContextGenerator.

Parameters:
samples -
Method Detail

generateEvents

public static List<opennlp.model.Event> generateEvents(String[] sentence,
                                                       String[] tags,
                                                       Object[] additionalContext,
                                                       POSContextGenerator cg)

generateEvents

public static List<opennlp.model.Event> generateEvents(String[] sentence,
                                                       String[] tags,
                                                       POSContextGenerator cg)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.