nlp-scores-0.1.0: Scoring functions commonly used for evaluation in NLP and IR

NLP.Scores

Synopsis

Documentation

sum :: Num a => [a] -> aSource

The sum of a list of numbers (without overflowing stack, unlike Prelude.sum).

mean :: (Fractional n, Real a) => [a] -> nSource

The mean of a list of numbers.

accuracy :: (Eq a, Fractional n) => [a] -> [a] -> nSource

Accuracy: the proportion of elements in the first list equal to elements at corresponding positions in second list. Lists should be of equal lengths.

recipRank :: (Eq a, Fractional n) => a -> [a] -> nSource

Reciprocal rank: the reciprocal of the rank at which the first arguments occurs in the list given as the second argument.