Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vindarel/fuzzy-match
Fuzzy match candidates from an input string.
https://github.com/vindarel/fuzzy-match
common-lisp fuzzy-match-candidates
Last synced: 5 days ago
JSON representation
Fuzzy match candidates from an input string.
- Host: GitHub
- URL: https://github.com/vindarel/fuzzy-match
- Owner: vindarel
- Created: 2020-09-03T15:54:06.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-21T22:31:44.000Z (almost 4 years ago)
- Last Synced: 2024-10-28T05:59:20.003Z (8 days ago)
- Topics: common-lisp, fuzzy-match-candidates
- Language: Common Lisp
- Homepage:
- Size: 9.77 KB
- Stars: 22
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fuzzy-match
Fuzzy match candidates from an input string.
On Quicklisp (2020-12) and [Ultralisp](https://ultralisp.org/).
~~~lisp
CL-USER> (fuzzy-match "hl" '("foo" "bar" "hello" "hey!"))
("hello" "hey!" "foo" "bar")
~~~~~~lisp
CL-USER> (fuzzy-match "zp" '("foo" "zepellin" "bar: zep"))
("zepellin" "bar: zep" "foo")
~~~The parameters are hand-picked for the results to feel natural. A
candidate that starts with the input substring should appear
first. For example, we use the Damerau-Levenshtein distance thanks to
the `MK-STRING-METRICS` library under the hood, but we don't obey to
its result.To give any objects as candidates, and not only strings, make them
implement `object-display`, that returns a string representation.# Nyxt origin
This code was extracted from the Nyxt browser. Original authors: Ambrevar, Vindarel.
# Licence
MIT