crf-chain2-generic-0.1.0: Second-order, generic, constrained, linear conditional random fields

Safe HaskellNone

Data.CRF.Chain2.Generic.Base

Synopsis

Documentation

data AVec a Source

Instances

Eq a => Eq (AVec a) 
(Eq (AVec a), Ord a) => Ord (AVec a) 
Read a => Read (AVec a) 
Show a => Show (AVec a) 

mkAVec :: Ord a => [a] -> AVec aSource

Smart AVec constructor which ensures that the underlying vector is strictly ascending.

data AVec2 a b Source

Instances

(Eq a, Eq b) => Eq (AVec2 a b) 
(Eq (AVec2 a b), Ord a, Ord b) => Ord (AVec2 a b) 
(Read a, Read b) => Read (AVec2 a b) 
(Show a, Show b) => Show (AVec2 a b) 

mkAVec2 :: Ord a => [(a, b)] -> AVec2 a bSource

Smart AVec constructor which ensures that the underlying vector is strictly ascending with respect to fst values.

data X o t Source

A word represented by a list of its observations and a list of its potential label interpretations.

Instances

(Eq o, Eq t) => Eq (X o t) 
(Eq (X o t), Ord o, Ord t) => Ord (X o t) 
(Read o, Read t) => Read (X o t) 
(Show o, Show t) => Show (X o t) 

type Xs o t = Vector (X o t)Source

Sentence of words.

mkX :: (Ord o, Ord t) => [o] -> [t] -> X o tSource

X constructor.

unX :: X o t -> [o]Source

List of observations.

unR :: X o t -> [t]Source

List of potential labels.

lbAt :: X o t -> LbIx -> tSource

data Y t Source

Instances

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

type Ys t = Vector (Y t)Source

Sentence of Y (label choices).

mkY :: Ord t => [(t, Double)] -> Y tSource

Y constructor.

unY :: Y t -> [(t, Double)]Source

Y deconstructor symetric to mkY.

type LbIx = IntSource

An index of the label.