concraft-0.14.2: Morphological disambiguation based on constrained CRFs

Safe HaskellNone
LanguageHaskell98

NLP.Concraft.Morphosyntax.WMap

Synopsis

Documentation

data WMap a Source #

A set with a non-negative weight assigned to each of its elements.

Instances
Eq a => Eq (WMap a) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax.WMap

Methods

(==) :: WMap a -> WMap a -> Bool #

(/=) :: WMap a -> WMap a -> Bool #

Ord a => Ord (WMap a) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax.WMap

Methods

compare :: WMap a -> WMap a -> Ordering #

(<) :: WMap a -> WMap a -> Bool #

(<=) :: WMap a -> WMap a -> Bool #

(>) :: WMap a -> WMap a -> Bool #

(>=) :: WMap a -> WMap a -> Bool #

max :: WMap a -> WMap a -> WMap a #

min :: WMap a -> WMap a -> WMap a #

Show a => Show (WMap a) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax.WMap

Methods

showsPrec :: Int -> WMap a -> ShowS #

show :: WMap a -> String #

showList :: [WMap a] -> ShowS #

Binary a => Binary (WMap a) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax.WMap

Methods

put :: WMap a -> Put #

get :: Get (WMap a) #

putList :: [WMap a] -> Put #

fromMap :: Map a Double -> WMap a Source #

Create WMap from a map.

mapWMap :: Ord b => (a -> b) -> WMap a -> WMap b Source #

Map function over weighted collection elements.

mkWMap :: Ord a => [(a, Double)] -> WMap a Source #

Make a weighted collection. Negative elements will be ignored.

trim :: Ord a => Int -> WMap a -> WMap a Source #

Trim down the set of potential labels to k most probable ones.