Crate typo_checker

Crate typo_checker 

Source

Structs§

SimilarWord
Struct that stores information about similar word
TypoCheckResult
Struct to store typo search results.

Enums§

CharacterPositon
Struct is used when there are too many or too few characters in the input word
TypoType
Enum that classifies the type of typo

Functions§

check_a_word
Returns TypoCheckResult type words that match or are similar to the word to be checked. Similar_word_list of type TypoCheckResult contains the top pickup_similar_word_num words with Levenshtein distance(less than or equal to output_levenshtein_cutoff).
close_keyboard_placement_list
Returns a hashmap of adjacent alphabets on a Qwert array keyboard.
find_different_a_char
Change the typo_type of similar_word to SimilarShapes or CloseKeyboardPlacement when one different character has a similar shape for the same string of characters. ※In this library, check_word and temp_word to be put into this function are “with Levenshtein distance of 1”, so there is always one different character.
find_missing_or_extra_chars
When the check word is compared to the correct word, if there are excesses or deficiencies before or after the word, the typo_type of similar_word is changed to ExtraCharacters or MissingCharacters.
get_dictionary
get_typo_type_name
Returns the name of the enumerator stored in the TypoType enumeration type. When using this function, the fields of the ExtraCharacters and MissingCharacters are omitted.
levenshtein
Call generic_levenshtein to calculate the Levenshtein distance
similar_shape_list
Returns an array of groups of alphabets that are similar in shape. Alphabets in the same array are considered “similar in shape”.