|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface InputHandler
interface to classes that handle reading and writing of input data for the CRF. The 'location' of the input
data is passed in via a text string. The interpretation of this text string is left up to the
InputHandler implementation. Commonly it will be a directory path, a file path, or some sort of
configuration string. The InputHandler returns InputSequences and TrainingSequences
to the engine.
The InputHandler is also reponsible for writing out data. This is necessary for subsetting and other
partitioning utilities. As with reading, an implementation dependent location string is used to specify where the
data should be written. When writing data, it is safe for the input handler to assume that the sequences it receives
for writing are in the same format as those it created during reading.
| Method Summary | |
|---|---|
java.util.Iterator<? extends InputSequence<?>> |
readInputData(java.lang.String location)
returns the input data read from the specified location. |
java.util.List<? extends TrainingSequence<?>> |
readTrainingData(java.lang.String location)
|
java.util.List<? extends TrainingSequence<?>> |
readTrainingData(java.lang.String location,
boolean predict)
returns the training data read from the specified location. |
void |
writeInputData(java.lang.String location,
java.util.Iterator<? extends InputSequence<?>> data)
writes input data to the specified location. |
void |
writeTrainingData(java.lang.String location,
java.util.List<? extends TrainingSequence<?>> data)
writes training data to the specified location. |
| Method Detail |
|---|
java.util.List<? extends TrainingSequence<?>> readTrainingData(java.lang.String location,
boolean predict)
throws java.io.IOException
Iterator so algorithms are not forced to hold
all of the training data at once (although most will). The interpretation of
the location string is dependent on the particular InputHandler implementation used.
location - string location of the data. Meaning is implementation dependent.
java.io.IOException - if there is a problem reading the data
java.util.List<? extends TrainingSequence<?>> readTrainingData(java.lang.String location)
throws java.io.IOException
java.io.IOException
java.util.Iterator<? extends InputSequence<?>> readInputData(java.lang.String location)
throws java.io.IOException
Iterator
because the inference algorithms can predict on the sequences one at a time. The interpretation of
the location string is dependent on the particular InputHandler implementation used.
location - string location of the data. Meaning is implementation dependent.
java.io.IOException - if there is a problem reading the data
void writeTrainingData(java.lang.String location,
java.util.List<? extends TrainingSequence<?>> data)
throws java.io.IOException
InputHandler implementation used.
location - string location of the data. Meaning is implementation dependent.data - a list of training sequences to write out.
java.io.IOException - if there is a problem reading the data
void writeInputData(java.lang.String location,
java.util.Iterator<? extends InputSequence<?>> data)
throws java.io.IOException
InputHandler implementation used.
location - string location of the data. Meaning is implementation dependent.data - an iterator over input sequences
java.io.IOException - if there is a problem reading the data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||