nltk.parse.NonprojectiveDependencyParser

class nltk.parse.NonprojectiveDependencyParser(dependency_grammar)[source]

A non-projective, rule-based, dependency parser. This parser will return the set of all possible non-projective parses based on the word-to-word relations defined in the parser’s dependency grammar, and will allow the branches of the parse tree to cross in order to capture a variety of linguistic phenomena that a projective parser will not.

Methods

__init__(dependency_grammar) Creates a new NonprojectiveDependencyParser.
parse(tokens) Parses the input tokens with respect to the parser’s grammar.