Package nltk :: Package corpus :: Package reader :: Module nombank :: Class NombankInstance
[hide private]
[frames] | no frames]

type NombankInstance

source code

object --+
         |
        NombankInstance

Instance Methods [hide private]
 
__init__(self, fileid, sentnum, wordnum, baseform, sensenumber, predicate, predid, 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.
  baseform
The baseform of the predicate.
  sensenumber
The sense number os the predicate
  predicate
A NombankTreePointer indicating the position of this instance's predicate within its containing sentence.
  predid
Identifier of the predicate
  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 nombank corpus.
Properties [hide private]
  roleset
The name of the roleset used by this instance's predicate.
  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, baseform, sensenumber, predicate, predid, 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.

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]

roleset

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

tree

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

Get Method:
_get_tree(self)