A fuzzy search and word metric library

Author(s): Isabel Garcia-Contreras.

The fuzzy_search library provides a set of predicates which calculate distance between words implementing levenshtein distance and damerau-levenshtein distance.

This is a simple example:


?- levenshtein_dist(append, apend, D).

D = 1 ? 

yes
?- levenshtein_dist(append, appedn, D).

D = 2 ? 

yes
?- 

?- damerau_lev_dist(length, lenght, D).

D = 1 ? 

yes
?-

Usage and interface

Documentation on exports

Usage:levenshtein_dist(Word1,Word2,Distance)

Computes the levenshtein Distance between Word1 and Word2

Usage:damerau_lev_dist(Word1,Word2,Distance)

Computes the Damerau-Levenshtein Distance between Word1 and Word2

Usage:fuzzy_search(Word,Generator,Metric,MaxDistance,Suggestion)

Proposes atoms generated by Generator which have MaxDistance differences with Word

Meta-predicate with arguments: fuzzy_search(?,pred(1),pred(3),?,?).

Documentation on imports

This module has the following direct dependencies: