crf-chain1-0.2.2: First-order, linear-chain conditional random fields

Safe HaskellSafe-Inferred




type Word a = Set aSource

A Word is represented by a set of observations.

type Sent a = [Word a]Source

A sentence of words.

data Dist a Source

A probability distribution defined over elements of type a. All elements not included in the map have probability equal to 0.

mkDist :: Ord a => [(a, Double)] -> Dist aSource

Construct the probability distribution.

type WordL a b = (Word a, Dist b)Source

A WordL is a labeled word, i.e. a word with probability distribution defined over labels.

annotate :: Word a -> b -> WordL a bSource

Annotate the word with the label.

type SentL a b = [WordL a b]Source

A sentence of labeled words.