edu.upenn.cis.propbank_shen
Class RoleSet

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

public class RoleSet
extends Object

A representation of a RoleSet as defined in the propbank lexical guidelines, frameset.dtd.

A roleset defines a sort of coarse grained sense for a verb. When we understand a verb as an object which relates things (such as in "John gave Mary a Penny", "gave" is relating John, Mary, and "a Penny".), we'll quickly come to see that verbs may relate different kinds of things. For example, the verb "call" may be used to relate either a caller with an object and a label (in the labelling sense of call) or a caller with a thing being summoned and a place being summoned to. (in the summon sense of call (eg "John called Mary over").

We then view each of these things

as a roleset. RoleSet objects provide a handle on these coarse grained senses.

Author:
Scott Cotton

Field Summary
protected  List examples
          the set of examples associated with the roleset
protected  String id
          the identifier of the roleset
protected  String name
          the name of the roleset, optional, can be null
protected  Node node
          the node from which a roleset is constructed
protected  List roles
          the set of roles associated with the roleset
protected  String[] vnclasses
          the VerbNet classes to which this roleset belongs
 
Constructor Summary
RoleSet(Node n)
          construct a RoleSet object from a roleset node in a frameset xml document.
 
Method Summary
 List getExamples()
          return a list of the Example objects associated with this roleset
 String getId()
          return the identifier associated with the roleset
 String getName()
          return the name of this roleset, or null if there is none specified.
 List getRoles()
          return the list of roles associated with the roleset
 String[] getVNClasses()
          return the verbnet class ids associated with this roleset
 boolean hasName()
          return true iff this roleset has an associated name
static void main(String[] args)
          A simple unit test
static RoleSet ofId(String id)
          create a RoleSet object from the id, where the id is in the form <verb>.NN, such as "go.01".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id
the identifier of the roleset


name

protected String name
the name of the roleset, optional, can be null


node

protected Node node
the node from which a roleset is constructed


roles

protected List roles
the set of roles associated with the roleset


examples

protected List examples
the set of examples associated with the roleset


vnclasses

protected String[] vnclasses
the VerbNet classes to which this roleset belongs

Constructor Detail

RoleSet

public RoleSet(Node n)
        throws CorruptDataException
construct a RoleSet object from a roleset node in a frameset xml document.

Throws:
CorruptDataException
Method Detail

ofId

public static RoleSet ofId(String id)
                    throws CorruptDataException
create a RoleSet object from the id, where the id is in the form <verb>.NN, such as "go.01".

Parameters:
id - the roleset identifier
Throws:
CorruptDataException

getId

public String getId()
return the identifier associated with the roleset


getName

public String getName()
return the name of this roleset, or null if there is none specified.


hasName

public boolean hasName()
return true iff this roleset has an associated name


getVNClasses

public String[] getVNClasses()
return the verbnet class ids associated with this roleset


getRoles

public List getRoles()
return the list of roles associated with the roleset

See Also:
Role

getExamples

public List getExamples()
return a list of the Example objects associated with this roleset

See Also:
Example

main

public static void main(String[] args)
                 throws CorruptDataException
A simple unit test

Throws:
CorruptDataException