Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Spell Check modules?

by coldfingertips (Pilgrim)
on Aug 02, 2003 at 14:59 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-09-27 08:07 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (118 votes). Check out past polls.