Metrics¶
Distance metrics¶
ALINE https://webdocs.cs.ualberta.ca/~kondrak/ Copyright 2002 by Grzegorz Kondrak. |
|
|
Simple equality test. |
|
|
|
Calculate the Levenshtein edit-distance between two strings. |
|
Calculate the minimum Levenshtein edit-distance based alignment mapping between two strings. |
|
|
|
Krippendorff's interval distance metric |
|
Distance metric comparing set-similarity. |
|
Distance metric that takes into account partial agreement when multiple labels are assigned. |
|
Higher-order function to test presence of a given label |
Scores¶
Represents an annotation task, i.e. people assign labels to items. |
|
|
The confusion matrix between a list of reference values and a corresponding list of test values. |
|
Class for storing lemmas, stems and evaluation metrics. |
|
Given a list of reference values and a corresponding list of test values, return the fraction of corresponding values that are equal. |
|
Returns an approximate significance level between two lists of independently generated test values. |
|
Given a set of reference values and a set of test values, return the f-measure of the test values, when compared against the reference values. |
|
Given a list of reference values and a corresponding list of test probability distributions, return the average log likelihood of the reference values, given the probability distributions. |
|
Given a set of reference values and a set of test values, return the fraction of test values that appear in the reference set. |
|
Given a set of reference values and a set of test values, return the fraction of reference values that appear in the test set. |
Segmentation¶
|
Compute the Generalized Hamming Distance for a reference and a hypothetical segmentation, corresponding to the cost related to the transformation of the hypothetical segmentation into the reference segmentation through boundary insertion, deletion and shift operations. |
|
Compute the Pk metric for a pair of segmentations A segmentation is any sequence over a vocabulary of two items (e.g. |
|
Compute the windowdiff score for a pair of segmentations. |
Spearman¶
|
Given a sequence of (key, score) tuples, yields each key with an increasing rank, tying with previous key's rank if the difference between their scores is less than rank_gap. |
|
Given a sequence, yields each element with an increasing rank, suitable for use as an argument to |
|
Returns the Spearman correlation coefficient for two rankings, which should be dicts or sequences of (key, rank). |
Translation¶
|
Calculate BLEU score (Bilingual Evaluation Understudy) from Papineni, Kishore, Salim Roukos, Todd Ward, and Wei-Jing Zhu. |
|
The RIBES (Rank-based Intuitive Bilingual Evaluation Score) from Hideki Isozaki, Tsutomu Hirao, Kevin Duh, Katsuhito Sudoh and Hajime Tsukada. |
|
Calculates METEOR score for hypothesis with multiple references as described in "Meteor: An Automatic Metric for MT Evaluation with HighLevels of Correlation with Human Judgments" by Alon Lavie and Abhaya Agarwal, in Proceedings of ACL. |
|
Return the Alignment Error Rate (AER) of an alignment with respect to a "gold standard" reference alignment. |
|
Calculate NIST score from George Doddington. |
|
Calculates the sentence level CHRF (Character n-gram F-score) described in |
|
Calculates the sentence level GLEU (Google-BLEU) score described in |