public class TrueCasingForNISTDocumentReaderAndWriter extends Object implements DocumentReaderAndWriter<CoreLabel>
Modifier and Type | Class and Description |
---|---|
static class |
TrueCasingForNISTDocumentReaderAndWriter.LineToTrueCasesParser |
Modifier and Type | Field and Description |
---|---|
static Set |
knownWords |
static boolean |
THREE_CLASSES |
static String |
THREE_CLASSES_PROPERTY |
Constructor and Description |
---|
TrueCasingForNISTDocumentReaderAndWriter() |
Modifier and Type | Method and Description |
---|---|
Iterator<List<CoreLabel>> |
getIterator(Reader r)
Return an iterator over the contents read from r.
|
void |
init(SeqClassifierFlags flags)
This will be called immediately after construction.
|
static boolean |
known(String s) |
static void |
main(String[] args)
for test only
|
void |
printAnswers(List<CoreLabel> doc,
PrintWriter out)
This method prints the output of the classifier to a
PrintWriter . |
public static final String THREE_CLASSES_PROPERTY
public static final boolean THREE_CLASSES
public static Set knownWords
public TrueCasingForNISTDocumentReaderAndWriter()
public static void main(String[] args) throws IOException
IOException
public void init(SeqClassifierFlags flags)
DocumentReaderAndWriter
init
in interface DocumentReaderAndWriter<CoreLabel>
flags
- Flags specifying behaviorpublic static boolean known(String s)
public Iterator<List<CoreLabel>> getIterator(Reader r)
IteratorFromReaderFactory
getIterator
in interface IteratorFromReaderFactory<List<CoreLabel>>
r
- Where to read objects frompublic void printAnswers(List<CoreLabel> doc, PrintWriter out)
DocumentReaderAndWriter
PrintWriter
.printAnswers
in interface DocumentReaderAndWriter<CoreLabel>
doc
- The document which has answers (it has been classified)out
- Where to send the output