NAME

Dict::FSA - FSA wrapper

VERSION

Version 0.1.2

DESCRIPTION

This module is a perl wrapper around fsa, a set of tools based on finite state automata (http://www.eti.pg.gda.pl/~jandac/fsa.html).

SYNOPSIS

use Dict::FSA;

Dict::FSA->create_dict($wordlist, $file);

my $dict = Dict::FSA->new();

$dict->check('foo');
$dict->suggest('foo');

Class methods

Dict::FSA->create_dict($wordlist, $file)

Creates a dictionnary from $wordlist suitable for use with fsa, and save it in file $file.

Constructor

Dict::FSALexed->new($distance, $wordfiles)

Creates and returns a new Dict::FSA object.

Optional parameters:

$distance

maximum distance for approximated matches

$wordfiles

an hashref of word file to use

Methods

$dict->check($word)

Check the dictionnary for exact match of word $word. Returns a true value if word is present in the dictionnary, false otherwise.

$dict->suggest($word)

Check the dictionnary for approximate match of word $word. Returns a list of approximated words from the dictionnary, according to parameters passed when creating the object.

$dict->query($word)

Query the dictionnary for word $word. Returns the raw result of the query, as a list of words.