Package nltk :: Package corpus :: Package reader :: Module conll :: Class ConllSRLInstance
[hide private]
[frames] | no frames]

Class ConllSRLInstance

source code

object --+
         |
        ConllSRLInstance

An SRL instance from a CoNLL corpus, which identifies and providing labels for the arguments of a single verb.

Instance Methods [hide private]
 
__init__(self, tree, verb_head, verb_stem, roleset, tagged_spans)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
pprint(self) source code

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

Instance Variables [hide private]
  verb
A list of the word indices of the words that compose the verb whose arguments are identified by this instance.
  verb_head
The word index of the head word of the verb whose arguments are identified by this instance.
  arguments
A list of (argspan, argid) tuples, specifying the location and type for each of the arguments identified by this instance.
  tagged_spans
A list of (span, id) tuples, specifying the location and type for each of the arguments, as well as the verb pieces, that make up this instance.
  tree
The parse tree for the sentence containing this instance.
  words
A list of the words in the sentence containing this instance.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, tree, verb_head, verb_stem, roleset, tagged_spans)
(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)

Instance Variable Details [hide private]

verb

A list of the word indices of the words that compose the verb whose arguments are identified by this instance. This will contain multiple word indices when multi-word verbs are used (e.g. 'turn on').

verb_head

The word index of the head word of the verb whose arguments are identified by this instance. E.g., for a sentence that uses the verb 'turn on,' verb_head will be the word index of the word 'turn'.

arguments

A list of (argspan, argid) tuples, specifying the location and type for each of the arguments identified by this instance. argspan is a tuple start, end, indicating that the argument consists of the words[start:end].