fuzzyset- Fuzzy set for approximate string matching

Safe HaskellNone




distance :: Text -> Text -> Double Source

Return the normalized Levenshtein distance between the two strings.

enclosedIn :: Text -> Char -> Text Source

Insert the character ch at the beginning and end of the input string.

normalized :: Text -> Text Source

Normalize the input by

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

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

Returns the euclidian norm, or magnitude, of the input list interpreted as a vector. That is, ( sqrt{ sum_{i=0}^n a_i^2 } ) for the input ( langle a_0, a_1, dots, a_n rangle ) where ( a_i ) is the element at position i in the input list.

substr Source


:: Int

Length of the substring

-> Int

A character offset m

-> Text

The input string

-> Text

A substring of length n

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

ε :: HashMap k v Source

Empty HashMap

(<$$>) :: (Functor f, Functor g) => (a -> b) -> g (f a) -> g (f b) Source

(<$$>) = fmap ∘ fmap

(−) :: Num α => α -> α -> α Source

Unicode minus sign symbol. Slightly longer than the hyphen-minus commonly used, U+2212 aligns naturally with the horizontal bar of the + symbol.

(×) :: Num α => α -> α -> α Source

Another unicode operator. This one for multiplication.