public class ArabicDocumentReaderAndWriter extends java.lang.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,
java.lang.String domain,
boolean stripRewrites,
TokenizerFactory<CoreLabel> tokFactory) |
ArabicDocumentReaderAndWriter(boolean hasSegMarkers,
boolean hasTags,
boolean hasDomainLabels,
java.lang.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 |
---|---|
java.util.Iterator<java.util.List<CoreLabel>> |
getIterator(java.io.Reader r)
Iterate over an input document.
|
void |
init(SeqClassifierFlags flags)
Required, but unused.
|
static void |
main(java.lang.String[] args)
For debugging.
|
void |
printAnswers(java.util.List<CoreLabel> doc,
java.io.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, java.lang.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, java.lang.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 java.util.Iterator<java.util.List<CoreLabel>> getIterator(java.io.Reader r)
getIterator
in interface IteratorFromReaderFactory<java.util.List<CoreLabel>>
r
- Where to read objects frompublic void printAnswers(java.util.List<CoreLabel> doc, java.io.PrintWriter pw)
DocumentReaderAndWriter
PrintWriter
.printAnswers
in interface DocumentReaderAndWriter<CoreLabel>
doc
- The document which has answers (it has been classified)pw
- Where to send the outputpublic static void main(java.lang.String[] args) throws java.io.IOException
args
- java.io.IOException