Or you can use Text::Ispell with all it's features. This is pulled from cpan showing all the options except for adding new words.


use Text::Ispell qw( spellcheck ); Text::Ispell::allow_compounds(1); for my $r ( spellcheck( "hello hacking perl salmoning fruithammer shr +dlu 42" ) ) if ( $r->{'type'} eq 'ok' ) { # as in the case of 'hello' print "'$r->{'term'}' was found in the dictionary.\n"; } elsif ( $r->{'type'} eq 'root' ) { # as in the case of 'hacking' print "'$r->{'term'}' can be formed from root '$r->{'root'}'\n"; } elsif ( $r->{'type'} eq 'miss' ) { # as in the case of 'perl' print "'$r->{'term'}' was not found in the dictionary;\n"; print "Near misses: $r->{'misses'}\n"; } elsif ( $r->{'type'} eq 'guess' ) { # as in the case of 'salmoning' print "'$r->{'term'}' was not found in the dictionary;\n"; print "Root/affix Guesses: $r->{'guesses'}\n"; } elsif ( $r->{'type'} eq 'compound' ) { # as in the case of 'fruithammer' print "'$r->{'term'}' is a valid compound word.\n"; } elsif ( $r->{'type'} eq 'none' ) { # as in the case of 'shrdlu' print "No match for term '$r->{'term'}'\n"; } }

In reply to Re: Spell Check by Storm
in thread Spell Check by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.