fuzzy search library
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
A D language fuzzy search library.
The algorithm used is a modified version of Smith–Waterman algorithm. The worst-case performance is O(m*n) for each entry provided in the input. (m and n are the respective length of the tested strings).
fuzzyd was primarily created to search matches in a list of files and commands.
Score extra points when:
- pattern is found at the beggining of the string.
- pattern is at word boundary position.
- case sensitive matches.
- isolated matches worth half of the points.
Note: The algorithm examines all the occurrences of the provided pattern, making it slower but more accurate.
import fuzzyd.core; string source = ["cd Documents" ,"curl localhost/foo" ,"rm -rf Downloads" ,"vi ~/Documents"]; auto result = new FuzzyResult[source.length]; auto fzy = fuzzy(source); fzy("docts", result); /* result => [FuzzyResult("cd Documents", 150, [4, 5, 0, 1, 10, 11, 3], true), FuzzyResult("curl localhost/foo", 65, [11, 0, 6, 16, 7, 12, 17, 13], true), FuzzyResult("rm -rf Downloads", 50, [12, 7, 14, 15, 8], true), FuzzyResult("vi ~/Documents", 140, [7, 12, 5, 6, 13], true)] */
- Registered by Felipe Beline Baravieira
- 2.0.1-beta released 2 years ago
- Copyright © 2020, Felipe Beline Baravieira
2.2.0-beta 2020-May-26 2.1.2-beta 2020-May-01 2.1.1-beta 2020-May-01 2.1.0-beta 2020-May-01 2.0.1-beta 2020-Apr-30
- Download Stats:
0 downloads today
0 downloads this week
0 downloads this month
400 downloads total
- Short URL: