help need to write a python spell checker

Xavier Ho contact at xavierho.com
Sat May 15 03:27:51 EDT 2010


1) Welcome to Python-List!

2) Python-list doesn't like to do other people's homework.

3) What have you tried?

Cheers,
Xav

On Fri, May 14, 2010 at 6:19 PM, harry k <hkiridis at yahoo.com.au> wrote:

> Write a spell checking tool that will identify all misspelled word in a
> text file using a provided dictionary.
>
>
> The program will accept either one or two command line parameters.
> 1.      The first command line parameter is the name of the text file that
> will be checked.
> 2.      The optional second command line parameter is the name of the
> dictionary file – a file of words with one word per line.  The default
> dictionary file is ref.txt.
> The program will write out the misspelled words, one per line, in
> alphabetical order.
>
> Extend the spell checking tool so that as well as identifying all
> misspelled words,  the program will list the line numbers in the file where
> the incorrect spelling occurs.
>
> The program will write out the misspelled words (one per line, in
> alphabetical order), followed by a tab character, followed by the list of
> line numbers that word is misspelled in,in ascending order, on the same
> line, separated by a single space.
>
>
> Extend the spell-checking tool so that the program will also print out a
> list of possible correct spellings for the words.
>
> The program will write out the misspelled words (one per line, in
> alphabetic order), followed (on the same line) by a single space, followed
> by the list of line numbers in ascending order, each separated by a single
> space, followed by a single space, then the list of possible correct
> spellings, each separated by a single space.
>
> Find the alternate spellings by considering:
> a.      Words in the dictionary that are the same length but:
> a.      Have a pair of characters interchanged
> b.      Differ by one character from the misspelled word
> b.      Words that are one character longer or one character shorter, but
> otherwise match the misspelled word.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100515/91c596d1/attachment.html>


More information about the Python-list mailing list