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

Class PropbankInstance

source code

object --+
         |
        PropbankInstance

Instance Methods [hide private]
 
__init__(self, filename, sentnum, wordnum, tagger, roleset, inflection, predicate, arguments, parse_corpus=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
_get_tree(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]
 
parse(s, parse_filename_xform=None, parse_corpus=None) source code
Instance Variables [hide private]
  filename
The name of the file containing the parse tree for this instance's sentence.
  sentnum
The sentence number of this sentence within filename.
  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.

Inherited from object: __class__

Method Details [hide private]

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

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Instance Variable Details [hide private]

sentnum

The sentence number of this sentence within filename. 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)