The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dict::Lexed - Lexed wrapper

VERSION

Version 0.1

DESCRIPTION

This module is a perl wrapper around Lexed, a lexicalizer developed at INRIA (http://www.lionel-clement.net/lexed)

SYNOPSIS

    use Dict::Lexed;

    Dict::Lexed->create_dict($wordlist);

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

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

Class methods

Dict::Lexed->create_dict($wordlist, $options, $mode_options)

Creates a dictionnary from $wordlist suitable for use with lexed.

Optional parameters:

$options

general options passed to lexed

$mode_options

specific build options passed to lexed

Constructor

Dict::Lexed->new($options, $mode_options)

Creates and returns a new Dict::Lexed object.

Optional parameters:

$options

general options passed to lexed

$mode_options

specific consultation options passed to lexed

Methods

$dict->query($word)

Queries lexed about the word $word. Returns lexed result as a list of words;

This is actually a low-level method, not intented for direct use.

$dict->check($word)

Queries lexed for presence/absence of a given word. Returns a true value if word $word is present in the dictionnary, false otherwise.

$dict->suggest($word)

Queries lexed for approximate match of a given word. Returns a list of words close to word $word, according to parameters passed when creating the object.

COPYRIGHT AND LICENSE

Copyright (C) 2004, INRIA.

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

AUTHOR

Guillaume Rousse <grousse@cpan.org>