fuzzyset-0.2.1: Fuzzy set for approximate string matching

Data.FuzzySet.Util

Synopsis

# Documentation

Normalize the input by

• removing non-word characters, except for spaces and commas; and
• converting alphabetic characters to lowercase.

Arguments

 :: Int Length of the substring -> Int The character offset m -> Text The input string -> Text A substring of length n

Return n characters starting from offset m in the input string.

Insert a character at the beginning and end of the given string.

norm :: (Integral a, Floating b) => [a] -> b Source #

Returns the euclidean norm, or magnitude, of the input list interpreted as a vector.

That is,

$$\quad \sqrt{ \sum_{i=0}^n a_i^2 }$$

for the input

$$\quad \langle a_0, a_1, \dots, a_n \rangle$$

where $$a_i$$ is the element at position i in the input list.

Return the normalized Levenshtein distance between the two strings. See https://en.wikipedia.org/wiki/Levenshtein_distance.