|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter
public class Sighan2005DocumentReaderAndWriter
DocumentReader for Chinese segmentation task. (Sighan bakeoff 2005) Reads in characters and labels them as 1 or 0 (word START or NONSTART).
Note: maybe this can do less interning, since some is done in ObjectBankWrapper, but this also calls trim() as it works....
| Nested Class Summary | |
|---|---|
class |
Sighan2005DocumentReaderAndWriter.CTBDocumentParser
|
| Constructor Summary | |
|---|---|
Sighan2005DocumentReaderAndWriter()
|
|
| Method Summary | |
|---|---|
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 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sighan2005DocumentReaderAndWriter()
| Method Detail |
|---|
public java.util.Iterator<java.util.List<CoreLabel>> getIterator(java.io.Reader r)
IteratorFromReaderFactory
getIterator in interface IteratorFromReaderFactory<java.util.List<CoreLabel>>r - Where to read objects from
public void init(SeqClassifierFlags flags)
DocumentReaderAndWriter
init in interface DocumentReaderAndWriter<CoreLabel>flags - Flags specifying behavior
public 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 output
public void printLattice(DFSA tagLattice,
java.util.List<CoreLabel> doc,
java.io.PrintWriter out)
LatticeWriterPrintWriter.
printLattice in interface LatticeWriter<CoreLabel>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||