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, reset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
forEachRemaining
public 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
- IOException
public static TextAnnotation loadCoNLLfile(String filename) throws FileNotFoundException
filename
- FileNotFoundException
protected void initializeReader()
AnnotationReader
initializeReader
in class AnnotationReader<TextAnnotation>
public boolean hasNext()
AnnotationReader
hasNext
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.