auto_correct_n_suggest

Crates.ioauto_correct_n_suggest
lib.rsauto_correct_n_suggest
version1.0.0
sourcesrc
created_at2021-05-19 11:09:23.953032
updated_at2021-05-31 17:07:56.340735
descriptionA rust Dictionary Trie. Performs autosuggestions on words with typos & autocompletes words 🦀
homepage
repositoryhttps://github.com/Tevinthuku/rust-dictionary-autocomplete-autosuggest
max_upload_size
id399518
size13,265
Tev (Tevinthuku)

documentation

README

auto_correct_n_suggest

Description

A rust Dictionary Trie. Performs autosuggestions on words with typos & autocompletes words 🦀

Link to crate

Installation

Add

auto_correct_n_suggest = "1.0.0"

to your Cargo.toml

How to use

use auto_correct_n_suggest;

let mut dictionary = auto_correct_n_suggest::Dictionary::new();
let word1 = "Dog".to_string();
let word2 = "Dogecoin".to_string();
dictionary.insert(word1);
dictionary.insert(word2);

let words_available = dictionary.find_words_based_on_prefix("Dog".to_string())?; // vec!["Dog", "Dogecoin"]

let typo_auto_suggestions = dictionary.auto_suggest_alternative_words("Dogecoins".to_string())?; // vec!["Dogecoin"]

Commit count: 19

cargo fmt