Crates.io | typo_checker |
lib.rs | typo_checker |
version | |
source | src |
created_at | 2024-10-27 01:48:19.03323 |
updated_at | 2024-11-02 11:15:57.662292 |
description | Searches for typos of English words and returns matches or similar words.(英単語のタイポを検索し、合致もしくは類似する単語を返却します) |
homepage | |
repository | https://github.com/sotanengel/typo_checker |
max_upload_size | |
id | 1424275 |
Cargo.toml error: | TOML parse error at line 22, column 1 | 22 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Returns TypoCheckResult type words that match or are similar to the word to be checked チェックする単語に合致、もしくは類似する単語をTypoCheckResult型で返却します
Code:
fn main() {
let a = "typ";
let typo_chec_result = typo_checker::check_a_word(a.to_string(), Some(2), 5, None);
println!("typo_chec_result: {:?}", typo_chec_result);
}
Output:
typo_chec_result: TypoCheckResult { match_word: None, similar_word_list: Some([SimilarWord { spelling: "type", levenshtein_length: 1, typo_type: MissingCharacters { character: 'e', position: Tail } }, SimilarWord { spelling: "gyp", levenshtein_length: 1, typo_type: CloseKeyboardPlacement }, SimilarWord { spelling: "tup", levenshtein_length: 1, typo_type: CloseKeyboardPlacement }, SimilarWord { spelling: "tap", levenshtein_length: 1, typo_type: UndefinedType }, SimilarWord { spelling: "tip", levenshtein_length: 1, typo_type: UndefinedType }]) }