public class CoNLLNerReader extends AnnotationReader<TextAnnotation>
corpusName, currentAnnotationId, resourceManager| Constructor and Description |
|---|
CoNLLNerReader(String conlldirectory)
This expects a directory that contains conll format files.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
conllline(String tag,
int num,
String word)
Convenience function to avoid having to think about this format all the time...
|
String |
generateReport()
TODO: generate a human-readable report of annotations read from the source file (plus whatever
other relevant statistics the user should know about).
|
boolean |
hasNext()
is there another annotation object to return?
|
protected void |
initializeReader()
called by constructor to perform subclass-specific initialization.
|
static TextAnnotation |
loadCoNLLfile(String filename)
This loads filename into a textannotation.
|
TextAnnotation |
next()
return the next annotation object.
|
static void |
TaToConll(List<TextAnnotation> tas,
String outpath)
Converts a list of annotated TextAnnotation into CoNLL format.
|
iterator, remove, resetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemainingpublic CoNLLNerReader(String conlldirectory)
conlldirectory - public static String conllline(String tag, int num, String word)
tag - num - word - public static void TaToConll(List<TextAnnotation> tas, String outpath) throws IOException
tas - outpath - IOExceptionpublic static TextAnnotation loadCoNLLfile(String filename) throws FileNotFoundException
filename - FileNotFoundExceptionprotected void initializeReader()
AnnotationReaderinitializeReader in class AnnotationReader<TextAnnotation>public boolean hasNext()
AnnotationReaderhasNext in interface Iterator<TextAnnotation>hasNext in class AnnotationReader<TextAnnotation>public TextAnnotation next()
next in interface Iterator<TextAnnotation>next in class AnnotationReader<TextAnnotation>public String generateReport()
generateReport in class AnnotationReader<TextAnnotation>Copyright © 2017. All rights reserved.