Skip to content

Who828/fuzzy_matcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fuzzy Matcher

A approximate pattern matching library for Clojure that can be used to find similar words based on the Levenshtein distance.

Based on Levenshtein distance by Vladimir Levenshtein.

Usage

(require '[fuzzy-matcher.core :as fuzzy])

;; Let's search for a list of similar words for a given word
(fuzzy/search "hi" ["ho" "hello" "correct" "boo" "hi"])
;;=> ("ho" "hi")

;; you can specify a different rank(edit distance) if you want to
(fuzzy/search "hi" ["ho" "hello" "correct" "boo" "hi"] :rank 4)
;;=> ("ho" "hi" "boo")

;; you can also find the edit distance between two strings as well
(edit-distance "house" "home")
;;=> 2

;; The default rank is 3.

License

Copyright © 2013 Smit Shah

Distributed under the Eclipse Public License, the same as Clojure.

About

Approximate String Matching using Levenshtein Distance algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published