Package nltk :: Package corpus :: Package reader :: Module propbank :: Class PropbankInstance
[hide private]
[frames] | no frames]

type PropbankInstance

source code

object --+
         |
        PropbankInstance

Instance Methods [hide private]
 
__init__(self, fileid, sentnum, wordnum, tagger, roleset, inflection, predicate, arguments, parse_corpus=None) source code
 
__repr__(self) source code
 
__str__(self) source code
 
_get_tree(self) source code
Static Methods [hide private]
 
parse(s, parse_fileid_xform=None, parse_corpus=None) source code
Instance Variables [hide private]
  fileid
The name of the file containing the parse tree for this instance's sentence.
  sentnum
The sentence number of this sentence within fileid.
  wordnum
The word number of this instance's predicate within its containing sentence.
  tagger
An identifier for the tagger who tagged this instance; or 'gold' if this is an adjuticated instance.
  roleset
The name of the roleset used by this instance's predicate.
  inflection
A {PropbankInflection} object describing the inflection of this instance's predicate.
  predicate
A PropbankTreePointer indicating the position of this instance's predicate within its containing sentence.
  arguments
A list of tuples (argloc, argid), specifying the location and identifier for each of the predicate's argument in the containing sentence.
  parse_corpus
A corpus reader for the parse trees corresponding to the instances in this propbank corpus.
Properties [hide private]
  tree
The parse tree corresponding to this instance, or None if the corresponding tree is not available.
Method Details [hide private]

__init__(self, fileid, sentnum, wordnum, tagger, roleset, inflection, predicate, arguments, parse_corpus=None)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Overrides: object.__str__
(inherited documentation)

Instance Variable Details [hide private]

sentnum

The sentence number of this sentence within fileid. Indexing starts from zero.

wordnum

The word number of this instance's predicate within its containing sentence. Word numbers are indexed starting from zero, and include traces and other empty parse elements.

roleset

The name of the roleset used by this instance's predicate. Use propbank.roleset() to look up information about the roleset.

arguments

A list of tuples (argloc, argid), specifying the location and identifier for each of the predicate's argument in the containing sentence. Argument identifiers are strings such as 'ARG0' or 'ARGM-TMP'. This list does *not* contain the predicate.


Property Details [hide private]

tree

The parse tree corresponding to this instance, or None if the corresponding tree is not available.

Get Method:
_get_tree(self)