Represents an annotation task, i.e. people assign labels to items.
Notation tries to match notation in Artstein and Poesio (2007).
In general, coders and items can be represented as any hashable object. Integers, for example, are fine, though strings are more readable. Labels must support the distance functions applied to them, so e.g. a string-edit-distance makes no sense if your labels are integers, whereas interval distance needs numeric values. A notable case of this is the MASI metric, which requires Python sets.
Method | __init__ |
Initialize an annotation task. |
Method | __str__ |
Undocumented |
Method |
|
Undocumented |
Method | agr |
Agreement between two coders on a given item |
Method | alpha |
Krippendorff 1980 |
Method |
|
Observed agreement between two coders on all items. |
Method | avg_ |
Average observed agreement across all coders and items. |
Method |
|
Undocumented |
Method |
|
Averaged over all labelers |
Method |
|
The observed disagreement for the weighted kappa coefficient. |
Method | kappa |
Cohen 1960 Averages naively over kappas for each coder pair. |
Method | kappa |
No summary |
Method | load |
Load an sequence of annotation results, appending to any data already loaded. |
Method | multi |
Davies and Fleiss 1982 Averages over observed and expected agreements for each coder pair. |
Method | N |
Implements the "n-notation" used in Artstein and Poesio (2007) |
Method |
|
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Method | pi |
Scott 1955; here, multi-pi. Equivalent to K from Siegel and Castellan (1988). |
Method | S |
Bennett, Albert and Goldstein 1954 |
Method | weighted |
Cohen 1968 |
Method | weighted |
Cohen 1968 |
Instance Variable | C |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | distance |
Undocumented |
Instance Variable | I |
Undocumented |
Instance Variable | K |
Undocumented |
Method | _grouped |
Undocumented |
Method | _pairwise |
Calculates the average of function results for each coder pair |
Initialize an annotation task.
The data argument can be None (to create an empty annotation task) or a sequence of 3-tuples, each representing a coder's labeling of an item:
(coder,item,label)
The distance argument is a function taking two arguments (labels) and producing a numerical distance. The distance from a label to itself should be zero:
distance(l,l) = 0
Load an sequence of annotation results, appending to any data already loaded.
- The argument is a sequence of 3-tuples, each representing a coder's labeling of an item:
- (coder,item,label)