Lingua::Ispell

Lingua::Ispell is a Perl module that offers encapsulating access to the Ispell program.
Download

Lingua::Ispell Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • John Porter
  • Publisher web site:
  • http://search.cpan.org/~jdporter/Crypt-RandPasswd-0.02/lib/Crypt/RandPasswd.pm

Lingua::Ispell Tags


Lingua::Ispell Description

Lingua::Ispell is a Perl module that offers encapsulating access to the Ispell program. Lingua::Ispell is a Perl module that offers encapsulating access to the Ispell program.Note: this module was previously known as Text::Ispell; if you have Text::Ispell installed on your system, it is now obsolete and should be replaced by Lingua::Ispell.ispell, when reporting on misspelled words, indicates the string it was unable to verify, as well as its starting offset in the input line. No such information is returned for words which are deemed to be correctly spelled. For example, in a line like "Can't buy a thrill", ispell simply reports that the line contained four correctly spelled words.Lingua::Ispell would like to identify which substrings of the input line are words -- correctly spelled or otherwise. It used to attempt to split the input line into words according to the same rules ispell uses; but that has proven to be very difficult, resulting in both slow and error-prone code.ConsequencesLingua::Ispell now operates only in "terse" mode. In this mode, only misspelled words are reported. Words which ispell verifies as correctly spelled are silently accepted.In the report structures returned by spellcheck(), the 'term' member is now always identical to the 'original' member; of the two, you should probably use the 'term' member. (Also consider the 'offset' member.) ispell does not report this information for correctly spelled words; if at some point in the future this capability is added to ispell, Lingua::Ispell will be updated to take advantage of it.Use of the $word_chars variable has been removed; setting it no longer has any effect.terse_mode() now does nothing.SYNOPSIS # Brief: use Lingua::Ispell; Lingua::Ispell::spellcheck( $string ); # or use Lingua::Ispell qw( spellcheck ); # import the function spellcheck( $string ); # Useful: use Lingua::Ispell qw( :all ); # import all symbols for my $r ( spellcheck( "hello hacking perl shrdlu 42" ) ) { print "$r->{'type'}: $r->{'term'}n"; }Lingua::Ispell::spellcheck() takes one argument. It must be a string, and it should contain only printable characters. One allowable exception is a terminal newline, which will be chomped off anyway. The line is fed to a coprocess running ispell for analysis. ispell parses the line into "terms" according to the language-specific rules in effect.The result of ispell's analysis of each term is a categorization of the term into one of six types: ok, compound, root, miss, none, and guess. Some of these carry additional information. The first three types are "correctly" spelled terms, and the last three are for "incorrectly" spelled terms.Lingua::Ispell::spellcheck returns a list of objects, each corresponding to a term in the spellchecked string. Each object is a hash (hash-ref) with at least two entries: 'term' and 'type'. The former contains the term ispell is reporting on, and the latter is ispell's determination of that term's type (see above). For types 'ok' and 'none', that is all the information there is. For the type 'root', an additional hash entry is present: 'root'. Its value is the word which ispell identified in the dictionary as being the likely root of the current term. For the type 'miss', an additional hash entry is present: 'misses'. Its value is an ref to an array of words which ispell identified as being "near-misses" of the current term, when scanning the dictionary. Requirements: · Perl


Lingua::Ispell Related Software