Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the fuzzy-match Reference Manual, version 0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 13:31:38 2020 GMT+0.
• Introduction | What fuzzy-match is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Fuzzy match candidates from an input string.
On Ultralisp.
CL-USER> (fuzzy-match "hl" '("foo" "bar" "hello" "hey!"))
("hello" "hey!" "foo" "bar")
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.
This code was extracted from the Nyxt browser. Original authors: Ambrevar, Vindarel.
MIT
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The fuzzy-match system |
vindarel <vindarel@mailz.org>
Nyxt project, Ambrevar, Vindarel
(:git "git@github.com:vindarel/fuzzy-match.git")
MIT
From a string input and a list of candidates, return the most relevant candidates first.
# Fuzzy-match
Fuzzy match candidates from an input string.
On [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
0.1
fuzzy-match.asd (file)
fuzzy-match.lisp (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The fuzzy-match.asd file | ||
• The fuzzy-match/fuzzy-match.lisp file |
Next: The fuzzy-match/fuzzy-match․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
fuzzy-match.asd
fuzzy-match (system)
Previous: The fuzzy-match․asd file, Up: Lisp files [Contents][Index]
fuzzy-match (system)
fuzzy-match.lisp
fuzzy-match (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The fuzzy-match package |
fuzzy-match.lisp (file)
common-lisp
fuzzy-match (function)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
From the user input and a list of suggestions, return a filtered list of
suggestions that have all the input words in them, and sort this list to have the
’most relevant’ first.
The match is case-sensitive if INPUT contains at least one uppercase character.
SUGGESTIONS-DISPLAY can be used to pass the pre-computed display strings of the
suggestions; otherwise ‘object-display’ is used.
fuzzy-match.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal generic functions |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
The threshold under which suggestions are eleminated.
fuzzy-match.lisp (file)
Next: Internal generic functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Fuzzy-match this list of files.
fuzzy-match.lisp (file)
Return the list of input substrings that match at least one suggestion. The substrings must be SUBSTRING-LENGTH characters long or more.
fuzzy-match.lisp (file)
Destructively filter out non-exact matches from suggestions.
If any input substring matches exactly (but not necessarily a whole word),
then all suggestions that are not exactly matched by at least one substring are removed.
fuzzy-match.lisp (file)
Return a SUGGESTION’s score for INPUT.
A higher score means the suggestion comes first.
fuzzy-match.lisp (file)
Sort SUGGESTION-PAIRS, the pair closest to INPUT in the levenshtein distance comes first.
SUGGESTION-PAIRS is a list of (display-value real-value). See ‘fuzzy-match’ for
more details.
fuzzy-match.lisp (file)
Return the norm of SUBSTRINGS with regard to STRING.
The norm is closer to 1 if
- substrings start near the beginning of STRING;
- substrings length are closer to the length of STRING.
Only substrings of SUBSTRING-LENGTH characters or more are considered.
fuzzy-match.lisp (file)
Convert INPUT to (simple-array character) type.
fuzzy-match.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
Like ‘print-object’, but for fuzzy-match.
fuzzy-match.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L |
---|
Jump to: | F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | F G K M O S T |
---|
Jump to: | F G K M O S T |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
S | |||
score-threshold : | Internal special variables | ||
Special Variable, score-threshold : | Internal special variables | ||
|
Jump to: | S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | F P S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
F | |||
fuzzy-match : | The fuzzy-match system | ||
fuzzy-match : | The fuzzy-match package | ||
| |||
P | |||
Package, fuzzy-match : | The fuzzy-match package | ||
| |||
S | |||
System, fuzzy-match : | The fuzzy-match system | ||
|
Jump to: | F P S |
---|