nltk.grammar.ProbabilisticDependencyGrammar

class nltk.grammar.ProbabilisticDependencyGrammar[source]

Bases: object

__init__(productions, events, tags)[source]
contains(head, mod)[source]

Return True if this DependencyGrammar contains a DependencyProduction mapping ‘head’ to ‘mod’.

Parameters
  • head (str) – A head word.

  • mod (str) – A mod word, to test as a modifier of ‘head’.

Return type

bool