-- * Scores for classification and ranking
+ -- * Scores for classification and ranking
-- * Scores for clustering
+ -- * Scores for clustering
-- * Auxiliary types and functions
+ -- * Auxiliary types and functions
-- * Extracting joint and marginal counts from 'Counts'
+ -- * Extracting joint and marginal counts from 'Counts'
+ -- * Extracting lists of values from Counts
import qualified Data.Foldable as F
-- | Count of second element
countSnd :: Ord k => k -> Counts a k -> Count
countSnd y = Map.findWithDefault 0 y . marginalSnd
+-- | List of values of first element
+fstElems :: Counts k b -> [k]
+fstElems = Map.keys . marginalFst
+-- | List of values of second element
+sndElems :: Counts a k -> [k]
+sndElems = Map.keys . marginalSnd
-- The package version. See the Haskell package versioning policy
-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
-- standards guiding when and how versions should be incremented.
-- A short (one-line) description of the package.
Synopsis: Scoring functions commonly used for evaluation in NLP and IR