H - the type of handler to which this corpus sends eventspublic class Corpus<H extends Handler> extends Object
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.| Modifier | Constructor and Description |
|---|---|
protected |
Corpus()
Construct a corpus.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.Copyright © 2016 Alias-i, Inc.. All rights reserved.