Package nltk :: Module grammar :: Class StatisticalDependencyGrammar
[hide private]
[frames] | no frames]

type StatisticalDependencyGrammar

source code

object --+
         |
        StatisticalDependencyGrammar

Instance Methods [hide private]
 
__init__(self, productions, events, tags) source code
boolean.
contains(self, head, mod)
Returns: true if this DependencyGrammar contains a DependencyProduction mapping 'head' to 'mod'.
source code
string
__str__(self)
Returns: A verbose string representation of the StatisticalDependencyGrammar
source code
 
__repr__(self)
Returns: A concise string representation of the StatisticalDependencyGrammar
source code
Method Details [hide private]

__init__(self, productions, events, tags)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

contains(self, head, mod)

source code 
Parameters:
  • head (string.) - A head word.
  • mod (string.) - A mod word, to test as a modifier of 'head'.
Returns: boolean.
true if this DependencyGrammar contains a DependencyProduction mapping 'head' to 'mod'.

__str__(self)
(Informal representation operator)

source code 
Returns: string
A verbose string representation of the StatisticalDependencyGrammar
Overrides: object.__str__

__repr__(self)
(Representation operator)

source code 
Returns:
A concise string representation of the StatisticalDependencyGrammar
Overrides: object.__repr__