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

Safe HaskellSafe-Infered

NLP.Scores

Synopsis

Documentation

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

The sum of a list of numbers (without overflowing stack, unlike 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.

jaccard :: (Fractional n, Ord a) => Set a -> Set a -> nSource

Jaccard coefficient J(A,B) = |AB| / |A union B|