Safe Haskell | None |
---|---|

Language | Haskell2010 |

- distance :: Text -> Text -> Double
- enclosedIn :: Text -> Char -> Text
- normalized :: Text -> Text
- norm :: (Integral a, Floating b) => [a] -> b
- substr :: Int -> Int -> Text -> Text
- ε :: HashMap k v
- (<$$>) :: (Functor f, Functor g) => (a -> b) -> g (f a) -> g (f b)
- (−) :: Num α => α -> α -> α
- (×) :: Num α => α -> α -> α

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

:: Int | Length of the substring |

-> Int | A character offset |

-> Text | The input string |

-> Text | A substring of length |

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