1 | def search(word)
|
2 | """Searches for a specific word in the dictionary. Important for use in other functions."""
|
3 | pass
|
4 |
|
5 | def addWord(word)
|
6 | """Adds a word to the dictionary."""
|
7 | pass
|
8 |
|
9 | def removeWord(word)
|
10 | """Removes a word from the dictionary."""
|
11 | pass
|
12 |
|
13 | def isWord(word)
|
14 | """Checks to see if the string is a word or merely a number (which would be correct, but not necessarily in the dictionary)."""
|
15 | pass
|
16 |
|
17 | def stripPunctuation(word)
|
18 | """Checks to see if a word has extraneous punctuation marks (e.g. a comma at the end). Returns the stripped word."""
|
19 | pass
|
20 |
|
21 | def similarWords(word)
|
22 | """Not absolutely necessary, but a nice convenience: if a word does not exist in the dictionary, the function searches for similar
|
23 | words (spelling-wise) and creates a list of five that may be the word in question."""
|
24 | pass
|
25 |
|
26 | def checkText(text)
|
27 | """Goes through each 'word' in text to see if it is a word or a number using isWord. If so, the function calls stripPunctuation to get rid of
|
28 | extra punctuation marks and searches for the word in question.
|
29 | If the word is found or it is not a word, the checker skips it. Otherwise, the user is shown the word and asked:
|
30 | - if it is one of the five similar words (if similarWords is implemented)
|
31 | - the correct spelling of the word in question
|
32 | - if they would like to add the word to the dictionary
|
33 | The function continues until each word in the text block has been analyzed."""
|
34 | pass |