public class CoNLLColumnFormatReader extends TextAnnotationReader
form POS full-parse chunk NE verb-sense verb-lemma [verb1-args
[verb2-args ... ]]
Modifier and Type | Field and Description |
---|---|
protected int |
currentLine |
static String |
LemmaIdentifier |
protected ArrayList<String> |
lines |
protected String |
predicateArgumentViewName |
protected String |
section |
static String |
SenseIdentifer |
corpusName, currentAnnotationId
Constructor and Description |
---|
CoNLLColumnFormatReader(String corpus,
String section,
String columnFile,
String predicateArgumentViewName)
Initialize the reader.
|
Modifier and Type | Method and Description |
---|---|
protected PredicateArgumentView |
getPredicateArgumentView(List<List<String>> argumentLabels,
List<List<Integer>> argumentStart,
List<List<Integer>> argumentEnd,
TextAnnotation ta,
List<String> verbSenses,
List<String> baseForms,
List<Integer> predicatePositions) |
boolean |
hasNext() |
protected void |
initializeReader() |
static void |
main(String[] args) |
protected SpanLabelView |
makeSpanLabeledView(List<String> chunkLabels,
List<Integer> chunkStart,
List<Integer> chunkEnd,
TextAnnotation ta,
String viewName) |
protected TextAnnotation |
makeTextAnnotation() |
void |
reset() |
protected boolean |
validate(List<String> chunkLabels,
List<Integer> chunkStart,
List<Integer> chunkEnd) |
iterator, next, remove
public static final String LemmaIdentifier
public static final String SenseIdentifer
protected final String predicateArgumentViewName
protected int currentLine
protected final String section
public CoNLLColumnFormatReader(String corpus, String section, String columnFile, String predicateArgumentViewName) throws Exception
corpus
- The name of the corpussection
- The section of WSJ that is to be read. This is largely
inconsequential, and is used only to assign identifiers to the
TextAnnotation
objects.columnFile
- The file containing the column format datapredicateArgumentViewName
- The name of the predicate argument view. For consistency, use
ViewNames#SRL_VERB
for verb SRL_VERB and ViewNames#SRL_NOM
for SRL_NOM.Exception
public boolean hasNext()
public void reset()
reset
in interface IResetableIterator<TextAnnotation>
reset
in class TextAnnotationReader
protected TextAnnotation makeTextAnnotation() throws Exception
makeTextAnnotation
in class TextAnnotationReader
Exception
protected PredicateArgumentView getPredicateArgumentView(List<List<String>> argumentLabels, List<List<Integer>> argumentStart, List<List<Integer>> argumentEnd, TextAnnotation ta, List<String> verbSenses, List<String> baseForms, List<Integer> predicatePositions)
protected SpanLabelView makeSpanLabeledView(List<String> chunkLabels, List<Integer> chunkStart, List<Integer> chunkEnd, TextAnnotation ta, String viewName)
protected boolean validate(List<String> chunkLabels, List<Integer> chunkStart, List<Integer> chunkEnd)
protected void initializeReader()
initializeReader
in class TextAnnotationReader
Copyright © 2015. All rights reserved.