public class ArabicDocumentReaderAndWriter extends Object implements DocumentReaderAndWriter<CoreLabel>
| Modifier and Type | Class and Description |
|---|---|
static class |
ArabicDocumentReaderAndWriter.RewrittenArabicAnnotation |
| Constructor and Description |
|---|
ArabicDocumentReaderAndWriter(boolean hasSegMarkers) |
ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
boolean hasDomainLabels,
String domain,
boolean stripRewrites,
TokenizerFactory<CoreLabel> tokFactory) |
ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
boolean hasDomainLabels,
String domain,
TokenizerFactory<CoreLabel> tokFactory) |
ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
TokenizerFactory<CoreLabel> tokFactory) |
ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
TokenizerFactory<CoreLabel> tokFactory) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<List<CoreLabel>> |
getIterator(Reader r)
Iterate over an input document.
|
void |
init(SeqClassifierFlags flags)
Required, but unused.
|
static void |
main(String[] args)
For debugging.
|
void |
printAnswers(List<CoreLabel> doc,
PrintWriter pw)
This method prints the output of the classifier to a
PrintWriter. |
public ArabicDocumentReaderAndWriter(boolean hasSegMarkers)
hasSegMarkers - if true, input has segmentation markerspublic ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
TokenizerFactory<CoreLabel> tokFactory)
hasSegMarkers - if true, input has segmentation markerstokFactory - a TokenizerFactory for the inputpublic ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
TokenizerFactory<CoreLabel> tokFactory)
hasSegMarkers - if true, input has segmentation markershasTags - if true, input has morphological analyses separated by tagDelimiter.tokFactory - a TokenizerFactory for the inputpublic ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
boolean hasDomainLabels,
String domain,
TokenizerFactory<CoreLabel> tokFactory)
hasSegMarkers - if true, input has segmentation markershasTags - if true, input has morphological analyses separated by tagDelimiter.hasDomainLabels - if true, input has a whitespace-terminated domain at the beginning
of each line of texttokFactory - a TokenizerFactory for the inputpublic ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
boolean hasDomainLabels,
String domain,
boolean stripRewrites,
TokenizerFactory<CoreLabel> tokFactory)
hasSegMarkers - if true, input has segmentation markershasTags - if true, input has morphological analyses separated by tagDelimiter.hasDomainLabels - if true, input has a whitespace-terminated domain at the beginning
of each line of textstripRewrites - if true, erase orthographical rewrites from the gold labels (for
comparison purposes)tokFactory - a TokenizerFactory for the inputpublic void init(SeqClassifierFlags flags)
init in interface DocumentReaderAndWriter<CoreLabel>flags - Flags specifying behaviorpublic Iterator<List<CoreLabel>> getIterator(Reader r)
getIterator in interface IteratorFromReaderFactory<List<CoreLabel>>r - Where to read objects frompublic void printAnswers(List<CoreLabel> doc, PrintWriter pw)
DocumentReaderAndWriterPrintWriter.printAnswers in interface DocumentReaderAndWriter<CoreLabel>doc - The document which has answers (it has been classified)pw - Where to send the outputpublic static void main(String[] args) throws IOException
args - IOException