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:
de
Translate to German.
es
Translate to Spanish.
fr
Translate to French.
it
Translate to Italian.
la
Translate to Latin.
pt
Translate to Portugese.
$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.