| 1 | # Cheng-Wen Chris Wang
|
| 2 |
|
| 3 | ### 3.
|
| 4 |
|
| 5 | def AddWord(word):
|
| 6 | """add a word to dictionary"""
|
| 7 | """return true if sucessful add, otherwise false"""
|
| 8 | pass
|
| 9 |
|
| 10 | def DelWord(word):
|
| 11 | """delete a word from dictionary"""
|
| 12 | """return true if sucessful, otherwise false"""
|
| 13 | pass
|
| 14 |
|
| 15 | def CheckWord(word):
|
| 16 | """check if a word is in the dictionary"""
|
| 17 | """return 'word' if the word is mispelled"""
|
| 18 | pass
|
| 19 |
|
| 20 | def CheckSent(sent):
|
| 21 | """spell check the given sent"""
|
| 22 | """return an array of mispelled word"""
|
| 23 | pass
|
| 24 |
|
| 25 | def LoadDic(filename):
|
| 26 | """add all the words in the given file to dictionary"""
|
| 27 | pass
|
| 28 |
|
| 29 | def IsWord(word):
|
| 30 | """return true if the input is a word"""
|
| 31 | pass
|
| 32 |
|
| 33 | def IsSent(sent):
|
| 34 | """return true if input is a sentence"""
|
| 35 | pass
|
| 36 |
|
| 37 | def IsFN(filename):
|
| 38 | """return true if the input is a filename"""
|
| 39 | pass
|
| 40 |
|
| 41 | def SpellCheck(target):
|
| 42 | """Spellcheck the target"""
|
| 43 | """target could be a word, a sentence, an essay, or a filename""" |