Popularity
5.7
Growing
Activity
4.7
-
14
3
2

Monthly Downloads: 156
Programming language: Haskell
License: MIT License
Tags: Text    

fuzzy alternatives and similar packages

Based on the "Text" category.
Alternatively, view fuzzy alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of fuzzy or a related project?

Add another 'Text' Package

README

fuzzy

Fuzzy string search library in Haskell. Uses TextualMonoid from monoid-subclasses to be able to run on different types of strings.

Ported from the JavaScript equivalent mattyork/fuzzy.

Installation

cabal install fuzzy

Usage


> import Text.Fuzzy

> match "fnt" "infinite" "" "" id True
Just ("infinite",3)

> match "hsk" ("Haskell",1995) "<" ">" fst False
Just ("<h>a<s><k>ell",5)

> filter "ML" [("Standard ML", 1990),("OCaml",1996),("Scala",2003)] "<" ">" fst False
[Fuzzy {original = ("Standard ML",1990), rendered = "standard <m><l>", score = 4},Fuzzy {original = ("OCaml",1996), rendered = "oca<m><l>", score = 4}]

> simpleFilter "vm" ["vim", "emacs", "virtual machine"]
["vim","virtual machine"]

> test "brd" "bread"
True

License

MIT


*Note that all licence references and agreements mentioned in the fuzzy README section above are relevant to that project's source code only.