fuzzyset-0.1.0.8: Fuzzy set for approximate string matching

Safe HaskellNone
LanguageHaskell2010

Data.FuzzySet.Util

Synopsis

Documentation

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 #

Arguments

:: 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 #

Another unicode operator. This one for multiplication.