nltk.parse.ProbabilisticProjectiveDependencyParser
¶
-
class
nltk.parse.
ProbabilisticProjectiveDependencyParser
[source]¶ A probabilistic, projective dependency parser.
This parser returns the most probable projective parse derived from the probabilistic dependency grammar derived from the train() method. The probabilistic model is an implementation of Eisner’s (1996) Model C, which conditions on head-word, head-tag, child-word, and child-tag. The decoding uses a bottom-up chart-based span concatenation algorithm that’s identical to the one utilized by the rule-based projective parser.
Methods¶
__init__ () |
Create a new probabilistic dependency parser. |
compute_prob (dg) |
Computes the probability of a dependency graph based on the parser’s probability model (defined by the parser’s statistical dependency grammar). |
concatenate (span1, span2) |
Concatenates the two spans in whichever way possible. |
parse (tokens) |
Parses the list of tokens subject to the projectivity constraint and the productions in the parser’s grammar. |
train (graphs) |
Trains a ProbabilisticDependencyGrammar based on the list of input DependencyGraphs. |