man Net::Dict::Leo () - Interface to Leo's Online Dictionary
NAME
Net::Dict::Leo - Interface to Leo's Online Dictionary
SYNOPSIS
use Net::Dict::Leo; leo_translate(I<phrase>); leo_translate(I<complex_search>);
DESCRIPTION
Leo (<http://dict.leo.org/>) offers an online English-German bidirectional dictionary, which this module offers an interface for.
- leo_translate(phrase);
- In its simplest form leo_translate accepts a word or phrase and queries Leo for all english and german translations. The return value is a list of pairs (two-element arrays) of corresponding english and german terms.
- leo_translate(complex_search);
- This function accepts a hash reference to specify parameters along with the search. As above, the return value is a list of pairs of corresponding english and german terms. Recognized hash keys include:
- search
- The word or phrase you are searching for. This is a must.
- searchLoc
- A signed integer denoting the direction of translation. Positive values are for German to English, negative values for English to German. The default value of 0 (zero) denotes bidirectional search.
- cmpType
- Determines how strictly the input of umlauts is handled. The accepted values are: exact: Only A:, O:, U:, a:, o:, u: are accepted. relaxed: (Default) In addition, the character sequences Ae, Oe, Ue, ae, oe, ue, ss are accepted as well. fuzzy: Even the characters A, O, U, a, o, u are accepted for the respective umlauts.
- useragent
- You can supply an optional user agent string if you don't like to be identified as libwww/perl.
BUGS
The search is limited to the first result page of dict.leo.org equivalent to 100 results. Even if there are more results you will not get any warning message at this time.
If called with combinations of words, leo is only performing a logical OR search, returning results which contain any one of the words. However, results with all of the words are returned first and thus, listed at the top.
No support for the German-French dictionary at dict.leo.org.
AUTHOR
Carsten Luckmann <leo@luckmann.name>