Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Spell Check modules?

by coldfingertips (Pilgrim)
on Aug 02, 2003 at 14:59 UTC ( [id://280285]=perlquestion: print w/replies, xml ) Need Help??

coldfingertips has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know of a fast and accurate (or any spell checker at all) spell checker where you can feed @words to and have it scan each word? I came across Net::Google::Spelling but that's only used for one or few words, not paragraphs at a time.

Thanks everyone

Replies are listed 'Best First'.
Re: Spell Check modules?
by Cine (Friar) on Aug 02, 2003 at 16:41 UTC

      Somebody's got to write a better search engine for CPAN...

Re: Spell Check modules?
by Anonymous Monk on Aug 02, 2003 at 15:09 UTC
Re: Spell Check modules?
by Anonymous Monk on Aug 02, 2003 at 15:14 UTC

    Here ya go:

    my %dictionary = (); open(DICTIONARY, "<your_dictionary") or die $!; while (<DICTIONARY>) { chomp; $dict{$_} = 1; } close(DICTIONARY); while (doc_to_check) { unless ($dict{$_}) { print "$_ is spelled incorrectly.\n"; } }

    The key is finding a good dictionary, and providing alternative spellings when a word isn't found.

Re: Spell Check modules?
by Anonymous Monk on Aug 02, 2003 at 15:07 UTC

    The closest thing I know of is GTK2::Spell.

    Due to the nature of the task, you're obviously going to need an external dictionary. I'd recommend you find one appropriate for your performance requirements and platform first, then writing a Perl wrapper should be straightforward, if it isn't already done.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://280285]
Approved by allolex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found