Aaron Straup Cope > Lingua-Lexicon-IDP-1.0 > Lingua::Lexicon::IDP

Download:
Lingua-Lexicon-IDP-1.0.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.0   Source  

NAME ^

Lingua::Lexicon::IDP - OOP interface for parsing Internet Dictionary Project files

SYNOPSIS ^

 use Lingua::Lexicon::IDP
 use Data::Denter;

 my $idp = Lingua::Lexicon::IDP->new("en");
 print Indent([ $idp->pt("dog")])."\n";'

 # prints:

 @
     cachorro[Noun]
     ca~o[Noun]
     "c%e3o[Noun]"

DESCRIPTION ^

An OOP interface for parsing translation files from the Internet Dictionary Project (IDP).

The package uses a boolean-search for doing lookups and the Memoize package for caching.

PACKAGE METHODS ^

__PACKAGE__->new($lang)

Currently, this method doesn't actually accept any parameters since the IDP has only released English-to-Foobar files.

Eventually, there might be a variety of different Foo-to-Bar files, in which case you will be able to specify $lang.

The default language is English.

Returns an object. Woot!

OBJECT METHODS ^

When an object is instantiated, the package automagically populates the symbol table with methods corresponding to the languages for which translation files exist.

Object methods return a list of words, or phrases.

English (en)

Available method for translating English words are:

$pkg->lang()

Return the language code for the current language.

$pkg->translations()

Return an array ref of language codes for which their are translation files available for $pkg->lang().

VERSION ^

1.0

DATE ^

$Date: 2003/02/04 14:03:59 $

AUTHOR ^

Aaron Straup Cope

SEE ALSO ^

http://www.ilovelanguages.com/IDP/

BUGS ^

Please report all bugs via http://rt.cpan.org

LICENSE ^

Copyright (c) 2003, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.

syntax highlighting: