public class Sighan2005DocumentReaderAndWriter extends java.lang.Object implements DocumentReaderAndWriter<CoreLabel>, LatticeWriter<CoreLabel,java.lang.String,java.lang.Integer>
| Constructor and Description |
|---|
Sighan2005DocumentReaderAndWriter() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<java.util.List<CoreLabel>> |
getIterator(java.io.Reader r)
Return an iterator over the contents read from r.
|
void |
init(SeqClassifierFlags flags)
This will be called immediately after construction.
|
void |
printAnswers(java.util.List<CoreLabel> doc,
java.io.PrintWriter pw)
This method prints the output of the classifier to a
PrintWriter. |
void |
printLattice(DFSA<java.lang.String,java.lang.Integer> tagLattice,
java.util.List<CoreLabel> doc,
java.io.PrintWriter out)
This method prints the output lattice (typically, Viterbi search graph) of
the classifier to a
PrintWriter. |
public java.util.Iterator<java.util.List<CoreLabel>> getIterator(java.io.Reader r)
IteratorFromReaderFactorygetIterator in interface IteratorFromReaderFactory<java.util.List<CoreLabel>>r - Where to read objects frompublic void init(SeqClassifierFlags flags)
DocumentReaderAndWriterinit in interface DocumentReaderAndWriter<CoreLabel>flags - Flags specifying behaviorpublic void printAnswers(java.util.List<CoreLabel> doc, java.io.PrintWriter pw)
DocumentReaderAndWriterPrintWriter.printAnswers in interface DocumentReaderAndWriter<CoreLabel>doc - The document which has answers (it has been classified)pw - Where to send the outputpublic void printLattice(DFSA<java.lang.String,java.lang.Integer> tagLattice, java.util.List<CoreLabel> doc, java.io.PrintWriter out)
LatticeWriterPrintWriter.printLattice in interface LatticeWriter<CoreLabel,java.lang.String,java.lang.Integer>