Download this file.
Feb 18, 11:53 - Chris: Very simple and clean, but it would be nicer if all the functions are implemented
Please log in if you would like to add comments. | |
1 | def addword(word):
| 2 | """Adds word to the dictionary."""
| 3 | pass
| 4 |
| 5 | def removeword(word):
| 6 | """Removes word from the dictionary."""
| 7 | pass
| 8 |
| 9 | def findword(word):
| 10 | """Finds word in the dictionary."""
| 11 | pass
| 12 |
| 13 | def loadDictionary(filename):
| 14 | """Loads dictionary from filename."""
| 15 | pass
| 16 |
| 17 | def parseWords(wordstring):
| 18 | """Returns a list of word strings, from the wordstring chunk."""
| 19 | return wordstring.split()
| 20 |
| 21 | def checkspelling(word):
| 22 | """Checks the spelling of ONE word. -- and returns word or None"""
| 23 | file = open('dict.txt')
| 24 | for line in file:
| 25 | if word.lower() = line:
| 26 | return word
| 27 | elif word = line:
| 28 | return word
| 29 | return None
| 30 |
| 31 | def checkchunk(wordstring):
| 32 | """Returns a list of words that have been verified against dictionary"""
| 33 | pass |
|