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

type 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) source code
 
__repr__(self) source code
 
pprint(self) source code
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.
Method Details [hide private]

__init__(self, tree, verb_head, verb_stem, roleset, tagged_spans)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
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].