|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.io.OutputHandlerWriter
public class OutputHandlerWriter
writes output to a file using a TrainingSequenceIO. The name of the output file will be computed from the output
location by using the configured FilenameMapper. If no mapper is configured, the output location will be used as
the filename.
| Constructor Summary | |
|---|---|
OutputHandlerWriter()
|
|
| Method Summary | |
|---|---|
FilenameMapper |
getFilenameMapper()
gets the mapper which will be used to generate the output filename based on the output location. |
TrainingSequenceIO |
getResultHandler()
gets the result handler which will be used to handle the output sequence |
void |
outputComplete()
indicates the writing of output is complete. |
void |
setFilenameMapper(FilenameMapper filenameMapper)
sets the mapper which will be used to generate the output filename based on the output location. |
void |
setOutputLocation(java.lang.String location)
sets the output location to write to. |
void |
setResultHandler(TrainingSequenceIO resultHandler)
sets the result handler which will be used to handle the output sequence |
void |
writeOutput(InputSequence<?> sequence,
int[] hiddenStates)
Writes out a set of predicted hidden states. |
void |
writeTestOutput(InputSequence<?> sequence,
int[] truePath,
int[] hiddenStates)
Writes out a set of hidden states compared with a known true path. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputHandlerWriter()
| Method Detail |
|---|
public void setOutputLocation(java.lang.String location)
OutputHandler
setOutputLocation in interface OutputHandlerlocation - the location to write the data to. The meaning is implementation dependent.
public void writeOutput(InputSequence<?> sequence,
int[] hiddenStates)
throws java.io.IOException
OutputHandlerOutputHandler.setOutputLocation(java.lang.String)
writeOutput in interface OutputHandlersequence - the input sequence on which predictions were madehiddenStates - an array of state indices for the predicted hidden states.
java.io.IOException
public void writeTestOutput(InputSequence<?> sequence,
int[] truePath,
int[] hiddenStates)
throws java.io.IOException
OutputHandlerOutputHandler.setOutputLocation(java.lang.String)
writeTestOutput in interface OutputHandlersequence - the input sequence on which predictions were madetruePath - an array of hidden states representing the true path.hiddenStates - an array of state indices for the predicted hidden states.
java.io.IOException
public void outputComplete()
throws java.io.IOException
OutputHandler
outputComplete in interface OutputHandlerjava.io.IOExceptionpublic FilenameMapper getFilenameMapper()
public void setFilenameMapper(FilenameMapper filenameMapper)
filenameMapper - the filenameMapper used to generate the output filename based on the output location.public TrainingSequenceIO getResultHandler()
public void setResultHandler(TrainingSequenceIO resultHandler)
resultHandler - the result handler which will be used to handle the output sequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||