Portability | portable |
---|---|
Stability | experimental |
Maintainer | Timo B. Huebel (tbh@holumbus.org) |
Safe Haskell | None |
Version : 0.2
The unique Holumbus mechanism for generating fuzzy sets.
- type FuzzySet = Map String FuzzyScore
- type Replacements = [Replacement]
- type Replacement = ((String, String), FuzzyScore)
- type FuzzyScore = Float
- data FuzzyConfig = FuzzyConfig {}
- englishReplacements :: Replacements
- germanReplacements :: Replacements
- fuzz :: FuzzyConfig -> String -> FuzzySet
- toList :: FuzzySet -> [(String, FuzzyScore)]
Fuzzy types
type FuzzySet = Map String FuzzyScoreSource
A set of string which have been fuzzed with an associated score.
type Replacements = [Replacement]Source
Some replacements which can be applied to a string to generate a FuzzySet
. The scores of
the replacements will be normalized to a maximum of 1.0.
type Replacement = ((String, String), FuzzyScore)Source
A single replacements, where the first will be replaced by the second and vice versa in the target string. The score indicates the amount of fuzzines that one single application of this replacement in just one direction will cause on the target string.
type FuzzyScore = FloatSource
The score indicating an amount of fuzziness.
data FuzzyConfig Source
The configuration of a fuzzy query.
FuzzyConfig | |
|
Predefined replacements
englishReplacements :: ReplacementsSource
Some default replacements for the english language.
germanReplacements :: ReplacementsSource
Some default replacements for the german language.
Generation
fuzz :: FuzzyConfig -> String -> FuzzySetSource
Continue fuzzing a string with the an explicitly specified list of replacements until a given score threshold is reached.
Conversion
toList :: FuzzySet -> [(String, FuzzyScore)]Source
Transform a fuzzy set into a list (ordered by score).