|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.upenn.cis.propbank_shen.Annotation
public class Annotation
This class represents an annotation in the propbank. An annotation represents a predicate argument structure together with an optional roleset done by some annotator (usually a person) and with some inflectional/morphological information.
PAStruct
,
PASLoc
,
Inflection
,
RoleSet
,
Argument
Field Summary | |
---|---|
protected String |
annotator
the annotator who is responsible. |
protected Inflection |
inflection
the inflectional information |
protected PAStruct |
pas
the predicate argument structure |
protected PASLoc |
pasloc
the location in the treebank |
protected RoleSet |
roleset
the roleset, if identified or null otherwise |
protected String |
rolesetid
the roleset identifier |
Constructor Summary | |
---|---|
Annotation(PASLoc loc,
String annotator,
RoleSet roleset,
Inflection inflection,
PAStruct structure)
|
|
Annotation(PASLoc loc,
String annotator,
String rolesetId,
Inflection inflection,
PAStruct structure)
|
|
Annotation(String ln)
construct an Annotation from a line of text. |
Method Summary | |
---|---|
String |
getAnnotator()
Return the annotator |
Inflection |
getInflection()
Return the inflection part of the annotation. |
String |
getLemma()
Return the lemma of the annotation |
PASLoc |
getPASLoc()
Return the predicate argument structure location. |
PAStruct |
getPAStruct()
Return the predicate argument structure portion of the annotation. |
Argument |
getRelation()
|
RoleSet |
getRoleSet()
Return the RoleSet of the annotation, if disambiguated, otherwise return null . |
String |
getRoleSetId()
Return the ID of the roleset, such as run.02 or find.XX. |
static void |
main(String[] args)
a unit test |
String |
toString()
Return a canonical string representation of this class, suitable for passing to the class's constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PAStruct pas
protected PASLoc pasloc
protected String annotator
protected Inflection inflection
protected String rolesetid
protected RoleSet roleset
Constructor Detail |
---|
public Annotation(String ln) throws CorruptDataException
wsj/00/wsj_0002.mrg 0 16 gold name.01 ----- 16_16-rel 0_14*17_17-ARG1 18_25-ARG2The first field is the relative path of the Wall Street Journal corpus file. The second field is the sentence number. The third field is the number of the terminal (treebank leaf) representing the annotated verb. The fourth field is the annotator name. (In Libin Shen's version of the Propbank, this is always either
gold
or mimic
, depending on whether the origin
is the actual Propbank or Libin's automatic annotation for the verb "be".)
The fifth field is the
roleset identifier (with .XX indicating this identifier is incomplete
and only refers to the verb, not to a particular roleset
associated with that verb). The fifth field describes the verb's inflection
in the original Propbank, but is left blank (-----
) in Libin's
versoin.
The remaining fields describe the predicate-argument structure. The main
difference to the original Propbank here is that locations are indicated
as word spans rather than as nodes in the Penn Treebank annotation.
CorruptDataException
public Annotation(PASLoc loc, String annotator, RoleSet roleset, Inflection inflection, PAStruct structure)
public Annotation(PASLoc loc, String annotator, String rolesetId, Inflection inflection, PAStruct structure)
Method Detail |
---|
public String toString()
toString
in class Object
public PAStruct getPAStruct()
PAStruct
public PASLoc getPASLoc()
PASLoc
public Argument getRelation()
public Inflection getInflection()
Inflection
public RoleSet getRoleSet() throws CorruptDataException
null
.
CorruptDataException
- if Roleset xml file is badRoleSet
public String getRoleSetId()
public String getLemma()
public String getAnnotator()
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |