Lingua::Lexicon::IDP - OOP interface for parsing Internet Dictionary Project files
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]"
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.
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!
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.
Available method for translating English words are:
Translate to German.
Translate to Spanish.
Translate to French.
Translate to Italian.
Translate to Latin.
Translate to Portugese.
Return the language code for the current language.
Return an array ref of language codes for which their are translation files available for $pkg->lang().
$Date: 2003/02/04 14:03:59 $
Aaron Straup Cope
Please report all bugs via http://rt.cpan.org
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.