001    package calhoun.analysis.crf.io;
002    
003    import java.io.IOException;
004    import java.io.Serializable;
005    import java.util.Iterator;
006    import java.util.List;
007    import java.util.Map;
008    
009    /** Interface for reading a training sequence from the specified location. */
010    public interface TrainingSequenceIO extends Serializable {
011            /** reads training sequences from the specified location. 
012             * @param location location of the training sequences.  Meaning is implementation dependent.
013             * @param seqs a list of the input sequences to which hidden sequences should be added.  Each hidden sequence is an array of integers containing hidden state indices.  */
014            void readTrainingSequences(Object location, List<TrainingSequence<Map<String, Object>>> seqs) throws IOException;  
015    
016            /** writes training sequences to the specified location.
017             * 
018             * @param location location of the training sequences.  Meaning is implementation dependent.
019             * @param data iterator over the hidden states to write.
020             */
021            void writeTrainingSequences(Object location, Iterator<int[]> data) throws IOException;  
022    }