calhoun.analysis.crf.io
Class AlignmentTree
java.lang.Object
calhoun.analysis.crf.io.AlignmentTree
- All Implemented Interfaces:
- InputComponentIO, java.io.Serializable
public class AlignmentTree
- extends java.lang.Object
- implements InputComponentIO
- See Also:
- Serialized Form
|
Method Summary |
java.lang.String |
getComponent()
|
java.util.List<java.lang.String> |
getComponentNames()
A list of names of the components of the InputSequence created by this reader. |
void |
readInputSequences(java.lang.String location,
java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
reads input sequences from this location. |
void |
setComponent(java.lang.String header)
|
void |
writeInputSequences(java.lang.String location,
java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
writes input sequences to this location. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlignmentTree
public AlignmentTree()
getComponentNames
public java.util.List<java.lang.String> getComponentNames()
- Description copied from interface:
InputComponentIO
- A list of names of the components of the InputSequence created by this reader.
- Specified by:
getComponentNames in interface InputComponentIO
- Returns:
- a list of input sequence component names.
readInputSequences
public void readInputSequences(java.lang.String location,
java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
throws java.io.IOException
- Description copied from interface:
InputComponentIO
- reads input sequences from this location. In most cases the location will be a file and this object will read in one or more components of the
overall input from that file. Alist of inputs is returned. Each input consists of a set of key-value pairs, where the key is the name of the
input component and the value is an (@link InputSequence) object. If this is not the first component to be loaded, this list may already contain
entries for the input.
- Specified by:
readInputSequences in interface InputComponentIO
- Parameters:
location - the location of the data to read. Meaning of the location is implementation dependent, but will usually be a file name.inputs - a list of input sequences. For each input sequence, a map is returned that maps component names to their
associated InputSequence objects.
- Throws:
java.io.IOException
writeInputSequences
public void writeInputSequences(java.lang.String location,
java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
throws java.io.IOException
- Description copied from interface:
InputComponentIO
- writes input sequences to this location.
InputComponentIO optionally can implement this function to provide the ability to write input
data as well as read it. This is used by many of the data manipulation tools, such as those for subsetting and creating cross-validation sets.
- Specified by:
writeInputSequences in interface InputComponentIO
- Parameters:
location - the location of the data to write. Meaning of the location is implementation dependent, but will usually be a file name.inputComponents - an iterator over input sequences. For each input sequence, a map is returned that maps component names to their
associated InputSequence objects. All components of the input are passed, and this object is reponsible for knowing which components
it should be writing.
- Throws:
java.io.IOException
getComponent
public java.lang.String getComponent()
- Returns:
- Returns the header.
setComponent
public void setComponent(java.lang.String header)
- Parameters:
header - The header to set.