|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.corpus.Corpus<H>
H - the type of handler to which this corpus sends eventspublic class Corpus<H extends Handler>
The Corpus abstract class provides a basis for passing
training and testing data to data handlers. The methods walk
handlers over the training and/or test data, depending on which of
the methods is called.
| Constructor Summary | |
|---|---|
protected |
Corpus()
Construct a corpus. |
| Method Summary | |
|---|---|
void |
visitCorpus(H handler)
Visit the entire corpus, sending all extracted events to the specified handler. |
void |
visitCorpus(H trainHandler,
H testHandler)
Visit the entire corpus, first sending training events to the specified training handler and then sending testing events to the test handler. |
void |
visitTest(H handler)
Visit the testing section of the corpus, sending events to the specified handler. |
void |
visitTrain(H handler)
Visit the training section of the corpus, sending events to the specified handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Corpus()
| Method Detail |
|---|
public void visitCorpus(H handler)
throws IOException
This is just a convenience method that is defined by:
visitCorpus(handler,handler);
handler - Handler for events extracted from the corpus.
IOException - If there is an underlying I/O error.
public void visitCorpus(H trainHandler,
H testHandler)
throws IOException
This is just a convenience method that is defined by:
visitTrain(trainHandler); visitTest(testHandler);
trainHandler - Handler for training events from the corpus.testHandler - Handler for testing events from the corpus.
IOException - If there is an underlying I/O error.
public void visitTrain(H handler)
throws IOException
The implementation does nothing. This method should be overridden by subclasses that contain training data.
handler - Handler for training events.
IOException - If there is an underlying I/O error.
public void visitTest(H handler)
throws IOException
The implementation does nothing. This method should be overridden by subclasses that contain test data.
handler - Handler for training events.
IOException - If there is an underlying I/O error.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||