class documentation

Undocumented

Method score scored. :rtype: A three-dimensional list of numbers. :return: The score is returned in a multidimensional(3) list, such that the outer-dimension refers to the head, and the inner-dimension refers to the dependencies...
Method train Typically the edges present in the graphs can be used as positive training examples, and the edges not present as negative examples.

Inherited from DependencyScorerI:

Method __init__ Undocumented
def score(self, graph): (source)

scored. :rtype: A three-dimensional list of numbers. :return: The score is returned in a multidimensional(3) list, such that the outer-dimension refers to the head, and the inner-dimension refers to the dependencies. For instance, scores[0][1] would reference the list of scores corresponding to arcs from node 0 to node 1. The node's 'address' field can be used to determine its number identification.

For further illustration, a score list corresponding to Fig.2 of Keith Hall's 'K-best Spanning Tree Parsing' paper:

scores = [[[], [5], [1], [1]],
[[], [], [11], [4]], [[], [10], [], [5]], [[], [8], [8], []]]

When used in conjunction with a MaxEntClassifier, each score would correspond to the confidence of a particular edge being classified with the positive training examples.

Parameters
graph:DependencyGraphA dependency graph whose set of edges need to be
def train(self, graphs): (source)

Typically the edges present in the graphs can be used as positive training examples, and the edges not present as negative examples.

Parameters
graphs:list(DependencyGraph)A list of dependency graphs to train the scorer.