public class CommaSRLSentence extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected TextAnnotation |
goldTa |
protected TextAnnotation |
ta |
Constructor and Description |
---|
CommaSRLSentence(TextAnnotation ta) |
CommaSRLSentence(TextAnnotation ta,
TextAnnotation goldTa)
If labels are not given construct commas and assign the labels according to the
bayraktar-syntax-pattern to comma label mappings
|
CommaSRLSentence(TextAnnotation ta,
TextAnnotation goldTa,
List<List<String>> labels)
Constructor for sentence which in turn constructs commas in the sentence.
|
Modifier and Type | Method and Description |
---|---|
String |
getAnnotatedText() |
List<Comma> |
getCommas() |
Collection<Comma> |
getFirstCommasWhichAreNotLast() |
Collection<Comma> |
getFirstSiblingCommasWhichAreNotLast() |
String |
getId() |
Collection<Comma> |
getMiddleCommas() |
Collection<Comma> |
getMiddleSiblingCommas() |
Comma |
getNextComma(Comma curr_c) |
Comma |
getNextSiblingComma(Comma curr_c) |
Comma |
getPreviousComma(Comma curr_c) |
Comma |
getPreviousSiblingComma(Comma curr_c) |
static CommaSRLSentence |
makeSentence(TextAnnotation ta,
TextAnnotation goldTa,
List<String> singleLabels)
helper for constructing sentences in which all commas have a single label
|
protected final TextAnnotation ta
protected final TextAnnotation goldTa
public CommaSRLSentence(TextAnnotation ta, TextAnnotation goldTa)
public CommaSRLSentence(TextAnnotation ta, TextAnnotation goldTa, List<List<String>> labels) throws Exception
ta
- the automaticgoldTa
- labels
- List of list of labels for each commaException
- throws exception if number of comma-label-lists provided is not equal to
number of commas in the sentencepublic CommaSRLSentence(TextAnnotation ta)
public static CommaSRLSentence makeSentence(TextAnnotation ta, TextAnnotation goldTa, List<String> singleLabels) throws Exception
Exception
public Collection<Comma> getFirstCommasWhichAreNotLast()
public Collection<Comma> getMiddleCommas()
public Collection<Comma> getFirstSiblingCommasWhichAreNotLast()
public Collection<Comma> getMiddleSiblingCommas()
public String getAnnotatedText()
public String getId()
Copyright © 2017. All rights reserved.