Magic String Search
Magic String Search is a simple yet powerful Rust library designed to find and rank strings based on their similarity to a query string. Whether you're developing a search engine, implementing auto-suggestion functionality, or just need to sort a list of strings by relevance, Magic String Search provides a straightforward API to accomplish these tasks efficiently.
Features
- String Similarity Ranking: Compare and rank strings based on their similarity to a given query string.
- Longest Common Subsequence (LCS): Utilizes the LCS algorithm to assess the similarity between strings.
- Normalized Comparison: Offers a normalized comparison function to handle varying lengths of strings and queries.
Installation
Add Magic String Search to your Cargo.toml
file:
[]
= "0.1.5"
Usage
Below is a simple example on how to use Magic String Search to compare two strings and rank multiple strings based on their similarity to a query string:
use ;
Contributing
Contributions to Magic String Search are welcome! Whether it's bug reports, feature requests, or code contributions, please feel free to open an issue or a pull request on our GitHub repository.
License
Magic String Search is released under the MIT License. See the LICENSE file for more details.