NAME

Tie::Ispell - Ties an hash with an ispell dictionary

VERSION

Version 0.08

ABSTRACT

This module implements a way to deal with ispell dictionaries using a hash. It tries to work also with aspell.

SYNOPSIS

    use Tie::Ispell;

    tie %dict, 'Tie::Ispell', "english";

    if ($dict{dog}) {
      print "dog is a word"
    }

    if (exists($dict{dog})) {
      print "dog is a word"
    }

    $dict{foo} = "now is a word :-)";




    # using nearmisses feature

    tie %dict, 'Tie::Ispell', "english", 1;

    if (exists($dict{dog})) {
      print "dog is a word"
    }

    if ($x = $dict{doj}) {
       if (ref($x) eq "ARRAY") {
         # doj is not a word, but I have a list of nearmisses
         @nearmisses = @$x;
       } else {
         # doj is a word
       }
    }

FUNCTIONS

TIEHASH

Used for the tie method. Use tie as:

  tie %dic, 'Tie::Ispell', 'dictionaryname';

If you want to have access to nearmisses, use

  tie %dic, 'Tie::Ispell', 'dictionaryname', 1;

FETCH

Fetches a word from the ispell dictionary

  $dic{dogs} # returns dog
  $dic{dog}  # returns dog
  $dic{doj}  # returns undef

If you tied-up with nearmisses,

  $dic{dogs} # returns dog
  $dic{dog}  # returns dog
  $dic{doj}  # returns a reference for a list of near misses

EXISTS

Checks if a word exists on the dictionary. Works in the same way with or without near misses.

  exists($dic{dogs})
  exists($dic{doj})

STORE

Defines a new word for current session dictionary

  $dic{foo} = 1;

AUTHOR

Alberto Simoes, <ambs@cpan.org>

Jose Joao Almeida, <jj@di.uminho.pt>

BUGS

Please report any bugs or feature requests to bug-tie-ispell@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Copyright 2004-2005 Natura Project, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.