edu.upenn.cis.propbank_shen
Class Annotation

java.lang.Object
  extended by edu.upenn.cis.propbank_shen.Annotation

public class Annotation
extends Object

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.

Author:
Scott Cotton
See Also:
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

pas

protected PAStruct pas
the predicate argument structure


pasloc

protected PASLoc pasloc
the location in the treebank


annotator

protected String annotator
the annotator who is responsible.


inflection

protected Inflection inflection
the inflectional information


rolesetid

protected String rolesetid
the roleset identifier


roleset

protected RoleSet roleset
the roleset, if identified or null otherwise

Constructor Detail

Annotation

public Annotation(String ln)
           throws CorruptDataException
construct an Annotation from a line of text. Here is an example line of text for input to the constructor.
 wsj/00/wsj_0002.mrg 0 16 gold name.01 ----- 16_16-rel 0_14*17_17-ARG1 18_25-ARG2
 
The 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.

Throws:
CorruptDataException

Annotation

public Annotation(PASLoc loc,
                  String annotator,
                  RoleSet roleset,
                  Inflection inflection,
                  PAStruct structure)

Annotation

public Annotation(PASLoc loc,
                  String annotator,
                  String rolesetId,
                  Inflection inflection,
                  PAStruct structure)
Method Detail

toString

public String toString()
Return a canonical string representation of this class, suitable for passing to the class's constructor.

Overrides:
toString in class Object

getPAStruct

public PAStruct getPAStruct()
Return the predicate argument structure portion of the annotation.

See Also:
PAStruct

getPASLoc

public PASLoc getPASLoc()
Return the predicate argument structure location.

See Also:
PASLoc

getRelation

public Argument getRelation()

getInflection

public Inflection getInflection()
Return the inflection part of the annotation.

See Also:
Inflection

getRoleSet

public RoleSet getRoleSet()
                   throws CorruptDataException
Return the RoleSet of the annotation, if disambiguated, otherwise return null.

Throws:
CorruptDataException - if Roleset xml file is bad
See Also:
RoleSet

getRoleSetId

public String getRoleSetId()
Return the ID of the roleset, such as run.02 or find.XX.


getLemma

public String getLemma()
Return the lemma of the annotation


getAnnotator

public String getAnnotator()
Return the annotator


main

public static void main(String[] args)
                 throws IOException
a unit test

Throws:
IOException