edu.upenn.cis.propbank_shen
Class PAStruct

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

public class PAStruct
extends Object

A class representing an instance of predicate argument structure.

Author:
Scott Cotton
See Also:
Argument

Field Summary
protected  List arguments
          the arguments associated with the structure, including the verb itself
protected  String lemma
          the predicate itself, i.e., the root form of the verb in question
 
Constructor Summary
PAStruct(String lem)
          construct a PAStruct object from the lemma
 
Method Summary
 void addArg(Argument a)
          Add a single argument to the arguments associated with this PA structures.
 boolean equals(Object o)
          Checks whether the PAstructs are equivalent.
 List getArgs()
          return a list of arguments, including the verb itself
 String getLemma()
          return the lemma, eg the root form of the associated verb.
 int hashCode()
           
 Argument nthArg(int n)
          get the nth argument
static PAStruct ofString(String s)
          create a predicate argument structure from a canonical string
 void removeArg(Argument a)
          remove the argument that is the same as a
 void removeArg(int i)
          remove the argument at position i.
 int size()
          The number of arguments
 String toString()
          convert the predicate argument structure to a canonical string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

arguments

protected List arguments
the arguments associated with the structure, including the verb itself


lemma

protected String lemma
the predicate itself, i.e., the root form of the verb in question

Constructor Detail

PAStruct

public PAStruct(String lem)
construct a PAStruct object from the lemma

Method Detail

getLemma

public String getLemma()
return the lemma, eg the root form of the associated verb.


getArgs

public List getArgs()
return a list of arguments, including the verb itself

See Also:
Argument

addArg

public void addArg(Argument a)
Add a single argument to the arguments associated with this PA structures.


nthArg

public Argument nthArg(int n)
get the nth argument

Parameters:
n - the n'th argument

removeArg

public void removeArg(int i)
remove the argument at position i.


removeArg

public void removeArg(Argument a)
remove the argument that is the same as a

Parameters:
a - argument to be removed

size

public int size()
The number of arguments


toString

public String toString()
convert the predicate argument structure to a canonical string.

Overrides:
toString in class Object

ofString

public static PAStruct ofString(String s)
                         throws CorruptDataException
create a predicate argument structure from a canonical string

Parameters:
s - the canonical string of the argument.
Throws:
CorruptDataException

equals

public boolean equals(Object o)
Checks whether the PAstructs are equivalent. Ignores the order in which the arguments are stored.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object