concraft-0.4.0: Morphosyntactic tagging tool based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Morphosyntax

Contents

Description

Types and functions related to the morphosyntax data layer.

Synopsis

Morphosyntax data

type Sent t = [Word t]Source

A sentence of Words.

data Word t Source

A word parametrized over a tag type.

Constructors

Word 

Fields

orth :: Text

Orthographic form.

tagWMap :: WMap t

Set of word interpretations. To each interpretation a weight of correctness within the context is assigned.

oov :: Bool

Out-of-vocabulary (OOV) word, i.e. word unknown to the morphosyntactic analyser.

Instances

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

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

Map function over word tags.

mapSent :: Ord b => (a -> b) -> Sent a -> Sent bSource

Map function over sentence tags.

interpsSet :: Word t -> Set tSource

Interpretations of the word.

interps :: Word t -> [t]Source

Interpretations of the word.

Weighted collection

data WMap a Source

A weighted collection of type a elements.

Instances

Eq a => Eq (WMap a) 
Ord a => Ord (WMap a) 
Show a => Show (WMap a) 

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

Make a weighted collection.

mapWMap :: Ord b => (a -> b) -> WMap a -> WMap bSource

Map function over weighted collection elements.