concraft-0.2.0: Morphosyntactic tagging tool based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Morphosyntax

Synopsis

Documentation

data Word t Source

A word parametrized over the tag type.

Constructors

Word 

Fields

orth :: Text

Orthographic form.

tags :: Set t

Set of word interpretations.

Instances

Eq t => Eq (Word t) 
(Eq (Word t), Ord t) => Ord (Word t) 
(Ord t, Read t) => Read (Word t) 
Show t => Show (Word t) 

mapWord :: Ord b => (a -> b) -> Word a -> Word bSource

type Sent t = [Word t]Source

A sentence of Words.

type Choice t = Map t (Positive Double)Source

Interpretations chosen in the given context with corresponding positive weights.

mapChoice :: Ord b => (a -> b) -> Choice a -> Choice bSource

data Positive a Source

Positive number.

Instances

Eq a => Eq (Positive a) 
(Eq (Positive a), Ord a) => Ord (Positive a) 
Show a => Show (Positive a) 

mkPositive :: (Num a, Ord a) => a -> Positive aSource

best :: Choice t -> tSource

Retrieve the most probable interpretation.

known :: Word t -> BoolSource

A word is considered to be known when the set of possible interpretations is not empty.