1 | #!/usr/bin/env python |
2 | |
3 | # Karl Chen |
4 | |
5 | # $Id: speling.py,v 1.1 2003/01/30 02:21:33 quarl Exp $ |
6 | |
7 | def read_dictionary(dictionary_file): |
8 | """Load a dictionary file.""" |
9 | pass |
10 | |
11 | def read_file(file): |
12 | """Reads a file and returns a string of its contents.""" |
13 | pass |
14 | |
15 | def check_word(word): |
16 | """Returns true if a word is spelled correctly.""" |
17 | pass |
18 | |
19 | def add_word(word): |
20 | """Add a word to the dictionary. |
21 | |
22 | Input WORD should not already exist in the dictionary. Returns None.""" |
23 | pass |
24 | |
25 | def remove_word(word): |
26 | """Remove a word from the dictionary. |
27 | |
28 | Input WORD should already exist in the dictionary. Returns None.""" |
29 | pass |
30 | |
31 | def check_file(file): |
32 | """Check a file for mis-spelled words. |
33 | |
34 | Input FILE should be the filename. The file is read and text is checked." |
35 | pass |
36 | |
37 | def check_text(text): |
38 | """Check a block of text for mis-spelled words. |
39 | |
40 | Input TEXT is any string. Returns None (user-interactive).""" |
41 | pass |
42 | |
43 | def tokenize_text(text): |
44 | """Tokenize a block of text into a list of words. |
45 | |
46 | Input TEXT is any string. Returns a list of words.""" |
47 | pass |