Download Latest Version fuzzy-matching-0.1.zip (4.0 kB)
Email in envelope

Get an email when there's a new version of fuzzy-matching

Home
Name Modified Size InfoDownloads / Week
README.rest.txt 2013-07-31 1.2 kB
fuzzy-matching-0.1.zip 2013-07-31 4.0 kB
Totals: 2 Items   5.1 kB 1

The fuzzy-matching library provides an OmniMark module omfuzzy.xmd with the pattern function fuzzy:

export switch function
   fuzzy               read-only  integer goals
         distance      write-only integer best-distance
         deletion      value      integer deletion-distance      optional
         insertion     value      integer insertion-distance     optional
         replacement   value      integer replacement-distance   optional
         transposition value      integer transposition-distance optional
as

The function succeeds only if the input prefix approximately matches any of the keys in goals. Each integer value of the goals shelf items determines the allowed _Damerau–Levenshtein distance: http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance__ between its key and the input.

Damerau–Levenshtein distance equals the minimum number of character deletions, insertions, replacements, and transpositions required to transform the target string into the input. The cost of each of the four transformations, if allowed, must be explicitly specified using the appropriate argument.

Source: README.rest.txt, updated 2013-07-31