language-spelling-0.1: Various tools to detect/correct mistakes in words

Safe HaskellNone

Language.Distance.Search.Class

Synopsis

Documentation

class Search container full algo | container -> full, container -> algo whereSource

Generic class for data structures that can perform queries retrieving words close to a given one.

Minimal definition: empty, insert, and query.

Methods

empty :: containerSource

insert :: full -> container -> containerSource

querySource

Arguments

:: Int

The maximum distance to search for

-> full

The starting word

-> container 
-> [(full, Distance algo)] 

singleton :: full -> containerSource

member :: full -> container -> BoolSource

fromList :: [full] -> containerSource

Instances

(Eq sym, ListLike full sym, EditDistance sym algo) => Search (BKDist full sym algo) full algo 
(Ord sym, ListLike full sym, EditDistance sym DamerauLevenshtein) => Search (TSTDist full sym DamerauLevenshtein) full DamerauLevenshtein 
(Ord sym, ListLike full sym, EditDistance sym Levenshtein) => Search (TSTDist full sym Levenshtein) full Levenshtein