leo: Laid-back online learning

As online translation tools go, leo is doing a very good job.

2015-03-05-6m47421-leo

leo is part of the WWW::Dict::Leo::Org perl package, and as far as I can tell, will only access the Leo dictionary site. For what I have seen of it, Leo works primarily into and out of German, with English and French as the main target (or source, of course) languages.

That does mean if you’re not interested in those languages, or if you’re working in a language that isn’t covered, leo might not be practical. On the other hand, it’s a good example of how a text-based online dictionary tool can work.

I’ve seen a few translation tools for the console, and the ones that worked weren’t terribly electrifying. leo seems to have a good grasp of how the output should appear.

Color is good, the table arrangement is easy to read, and aside from the rather wide dimensions, this is a good style for easy cutting-and-pasting. leo will take a term as a target or through STDIN, so you can pipe text into leo without disrupting the process.

Error handling seems a little primitive, since unknown words just trigger a 404 error message and a program line number. It seems like there should be a more graceful way to handle that. And leo doesn’t seem prepared to handle more than a single word at a time, which is a pity.

Otherwise I could find no issues in the way leo handled my requests. I like the way the results are arranged, and aside from a few funny glitches when I tried to pipe the results of the English-to-German results back into leo for German-to-French translation (I hoped to get English-to-French in a roundabout way), I couldn’t find any errors.

Debian users have the luxury of installing just libwww-dict-leo-org-perl to get at the leo executable; Arch users can technically get it from AUR, but you will need to update the PKGBUILD files for both perl-www-dict-leo-org and perl-html-tableparser and update the former to the 1.39 version. (perl-html-tableparser will work at the listed version, but I flagged it as out-of-date anyway.) It’s not too difficult a task, if you have a few moments to spare. 😉