-
Notifications
You must be signed in to change notification settings - Fork 2
Spellcheck UML Class Diagram
(try the mirror link if the first one doesn't work)
- is_misspelled: bool
- has_suggestion: bool
-
parse(string): Word
Takes an input and turns it into a word
-
parse_file(file): *words
Walks through a file and generates a list of words
- dict: trie
-
valid_word(string, dict): bool
Takes in a word and returns true if the word is contained in the dictionary
-
add_word(string): word
Add the specified word into the dictionary
-
parse_dictionary(file): dict
Takes a file containing a list of words to make up a dictionary, then creates a trie containing the dictionary of those words
- correct_word: string
- misspelled_word: string
- min_lev_distance: int
- max_number_suggestions: int
- trie
-
remove_punctuation(string):void
Strips a string of any punctuation. Do not strip the character "'"
-
find_lev_distance(string, string): int
finds the levenshtein distance between the misspelled word and words from the trie
-
generate_suggestions(string, int, trie): *string
Generates a list of suggestions for a misspelled word
-
remove_capitalization(string): string
Removes capitalization from a string
-
highlight_word(string): void
Highlights or identifies the misspelled word
-
save_file(file): file
An option to save the file automatically after a correction
-
save_as_another(file): file
An option to save the corrections as a new file after a correction
- file: file
-
parse_file(file): string
Takes in a file and goes through each word int the file
-
ignore_word(string): void
Allows the user to ignore a word suggestion they do not prefer
-
replace_word(string):string
Replaces the misspelled word with the correct word
-
alternate_spelling(string, spelling): string
Allows the user to specify an alternate spelling for a misspelled word
-
welcome_screen(): void
Displays the welcome screen
-
help_screen(): void
Displays the help screen
-
display_suggestions(*string): void
Shows the list of suggestions (might take in a trie instead)
- suggested_words_list: *string
-
generate_replacement(file):file
Generates a file similar to the input file, except all misspelled words are replaced with their closest suggestions
-
generate_misspelled_words(file):file
Generates a file containing a list of all misspelled words from the input file and their closest replacements
-
show_changes(): void
Displays the changes made while in spellcheck