A Unity Package to implement fuzzy string search from a list. Implements Levenshtein Distance and Hamming Distance as string search algorithms
This is a very bare-bones package right now. Some of the items to check off before this package is worth a 1.0 release are as follows:
- Add more string matching approaches
- Implement different target heuristics, similar to TheFuzz
- Add regex based search queries, similar to Emacs Orderless
- Move the entire codebase to Burst for optimized searches on larger lists
- Add Tests, samples, documentation
- Extensibility for custom scoring functions
This package can be added to your project via Git UPM. To add this package, copy:
https://github.com/ThatAmuzak/FastFuzzySearch.gitand add it as a git package in the Unity Package Manager.
Simply use
FuzzySearch.GetBestOne(target, wordList);to get the closest match. Alternatively, you can use
FuzzySearch.GetBestN(target, wordList, returnCount);to get a list of the closest matches instead.
You can also select the matching algorithm, and if exact subsequences should get a boost to the score. By default, the matching algorithm uses Levenshtein, and exact subsequences boost is false.
Please see the CONTRIBUTING.md file for details on contributing to this project.
This project is licensed under the Unlicensed License - see the LICENSE file for details.
