edu.upenn.cis.propbank_shen
Class Argument

java.lang.Object
  extended by edu.upenn.cis.propbank_shen.Argument
All Implemented Interfaces:
Comparable

public class Argument
extends Object
implements Comparable

This class represents an "argument" in a "predicate argument structure". As such, on a logical/mathematical level, one may construe an "argument" as a projection of tuple, where the tuple is an element of a relation "defined" by the verb in question. For example, the sentence

John gave Sue a Penny.

may be viewed as denoting, amongst other things, a predicate "gave" with three "arguments", as in gave(John,Sue,Penny).

In the propbank, each of these arguments is constituted by up to three things (two of which arg optional):

  1. an argument label, as defined by the class ArgLabel
  2. an optional modifying label, as defined by the class ModLabel
  3. an optional argument location, as defined by the class ArgLoc

Author:
Scott Cotton
See Also:
ArgLabel, ModLabel, ArgLoc

Field Summary
 ArgLabel arg_label
          the primary argument label associated with this Argument
 ArgLoc location
          the edu.upenn.cis.treebank location associated with this argument, or null
 ModLabel mod_label
          the secondary label associated with this argument, or null
static String sep
          the separator for the parts for one-line at a time representation
 
Constructor Summary
Argument(ArgLabel albl)
          create an Argument from just a label
Argument(ArgLabel albl, ArgLoc aloc)
          create an Argument from an argument label and a location
Argument(ArgLabel albl, ModLabel mlbl)
          create an Argument from an argument label and a modifiying label
Argument(ArgLabel albl, ModLabel mlbl, ArgLoc aloc)
          create an Argument from an argument label, a modifying label, and a location
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 ArgLoc getLocation()
           
static Argument ofString(String s)
          convert a string into an "argument".
 void setLabel(ArgLabel al)
          set the argument's primary label.
 void setLocation(ArgLoc loc)
          set the argument's location to loc
 void setMod(ModLabel ml)
          set the arguments modifying label.
 String toString()
          produce a canonical string from the Argument
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arg_label

public ArgLabel arg_label
the primary argument label associated with this Argument


mod_label

public ModLabel mod_label
the secondary label associated with this argument, or null


location

public ArgLoc location
the edu.upenn.cis.treebank location associated with this argument, or null


sep

public static final String sep
the separator for the parts for one-line at a time representation

See Also:
Constant Field Values
Constructor Detail

Argument

public Argument(ArgLabel albl)
create an Argument from just a label


Argument

public Argument(ArgLabel albl,
                ModLabel mlbl)
create an Argument from an argument label and a modifiying label


Argument

public Argument(ArgLabel albl,
                ArgLoc aloc)
create an Argument from an argument label and a location


Argument

public Argument(ArgLabel albl,
                ModLabel mlbl,
                ArgLoc aloc)
create an Argument from an argument label, a modifying label, and a location

Method Detail

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

setLocation

public void setLocation(ArgLoc loc)
set the argument's location to loc

Parameters:
loc - the new argument location

getLocation

public ArgLoc getLocation()

setMod

public void setMod(ModLabel ml)
set the arguments modifying label.

Parameters:
ml - the new modifying label

setLabel

public void setLabel(ArgLabel al)
set the argument's primary label.

Parameters:
al - the new primary label

toString

public String toString()
produce a canonical string from the Argument

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

ofString

public static Argument ofString(String s)
                         throws CorruptDataException
convert a string into an "argument".

Parameters:
s - the string to be converted.
Throws:
CorruptDataException