|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgate.creole.ml.maxent.GateEventStream
This class is used by MaxentWrapper. When created, it is passed a data structure containg all the training data for the classifier. It can then provide this data to the maxent model itself, as needed.
| Field Summary | |
(package private) boolean |
DEBUG
|
(package private) int |
index
|
(package private) int |
indexOfOutcome
|
(package private) List |
trainingData
|
| Constructor Summary | |
(package private) |
GateEventStream(List newTrainingData,
int newIndexOfOutcome)
This constructor stores all the training data in the object when the object is created. |
| Method Summary | |
boolean |
hasNext()
See whether there are any more instances to be extracted from this object. |
private opennlp.maxent.Event |
instance2Event(List instance)
Convert an instance into an Event object, taking note of the position of the outcome (class attribute) stored in this object. |
opennlp.maxent.Event |
nextEvent()
Extract the next instance from those stored in this object, and advance the objects internal index to point at the next instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
boolean DEBUG
final List trainingData
final int indexOfOutcome
int index
| Constructor Detail |
GateEventStream(List newTrainingData,
int newIndexOfOutcome)
newTrainingData - A List of Lists of String objects. Each String is
a maxent feature or outcome.newIndexOfOutcome - This is the index of the String objects that are
the outcomes.| Method Detail |
public opennlp.maxent.Event nextEvent()
nextEvent in interface opennlp.maxent.EventStreampublic boolean hasNext()
hasNext in interface opennlp.maxent.EventStreamprivate opennlp.maxent.Event instance2Event(List instance)
instance - The instance in the form of a list of String objects.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||