adict-0.2.0: Approximate dictionary searching

Safe HaskellNone

NLP.Adict.Core

Synopsis

Documentation

type Word a = Vector aSource

A word parametrized with character type a.

type Pos = IntSource

Position in a sentence.

type Weight = DoubleSource

Cost of edit operation. It has to be a non-negative value!

costDefault :: Eq a => Cost aSource

Simple cost function: all edit operations cost 1.

data Cost a Source

Cost represents a cost (or weight) of a symbol insertion, deletion or substitution. It can depend on edit operation position and on symbol values.

Constructors

Cost 

Fields

insert :: Pos -> a -> Weight
 
delete :: Pos -> a -> Weight
 
subst :: Pos -> a -> a -> Weight
 

(#) :: Vector a -> Int -> aSource