Tag Archives: dictionary

leo: Laid-back online learning

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


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. 😉


sdcv: Local lookup, some assembly required

I’m a big fan of dict, the online dictionary and thesaurus tool that runs almost completely at the command prompt.

Of course, if I’m stuck offline, I’m stuck completely. Words fail me. Literally. 😯

sdcv is a console interface to the somewhat-dated StarDict tool. And in contrast to dict, sdcv works with locally downloaded (or created, I suppose) dictionaries.


There’s not a whole lot to see with sdcv, although that will depend entirely on how many dictionaries you have, and what you ask of them.

Output is a little odd. I think that might be because the dictionaries are intended for a graphical tool, not strict text.

I don’t see any options within sdcv to strip out that coding, so I’m going to enlist the services of dehtml … and that’s what you see above. It’s not perfect, but it’s more readable than as it appears raw.

Of course, the alternative to that is to pipe sdcv’s output into a file, and use a browser to open it.


Either way, there may be some added steps to viewing a definition.

On the other hand, you do have the pick of several dictionaries, cross-language or otherwise, and they’re stored locally. And being the clever young hacker that you are, I’m sure you’ll find a way to build your own dictionaries too.

So to recap … dict for online dictionary access in clean plain text, or sdcv for custom dictionaries stored locally and subject to your scrutiny. You can choose which you like. Or … why not both? :mrgreen:

dict: Another great tool for writers

I mentioned a long while ago that the biggest help in writing for this crummy blog is charm, and a capable lieutenant to charm was aspell.

I neglected to mention dict, and that was a grievous oversight.


dict is a huge timesaver, even if you don’t live at the console 100 percent of the time.

I have a lousy Internet connection (thanks for the sad news, bing) and it can take more than 20 seconds just to load the front page of dictionary.com. (Just to be clear, that’s not their fault, it’s my landlord’s fault. 👿 )

On the other hand, dict can skim through a rasher of dictionaries, gazetteers and thesauri in a fraction of a second, and come up with answers that are just as good.

And in this age of impatience — oops, I mean information, speed is king.

Best of all, there is a laundry list of translation dictionaries, gimmick dictionaries, jargon lists and so forth to install. Have fun with Ambrose Bierce’s classic Devil’s Dictionary, for starters.

I don’t like saying this too loud, because once word gets out, everyone will want it, but: If you don’t have dict on your machine, you’re missing out.

dxcc: Exhausting my quota of exclamation points!

While I search line-by-line through my list of a thousand programs, I run into a lot of stuff I know nothing about.

I enjoy learning things, but it’s a sad fact that sometimes I dismiss things out of hand, just because they’re so far removed from my frame of reference.

But sometimes … I find cool stuff! Here’s dxcc:


What does all that mean? I don’t know! But it looks cool! :mrgreen:

I’m being facetious. I have a very primitive idea what ham radio is, and I know there’s a lot of stuff in Debian (and other distros) aimed at radio operators.

Why? I couldn’t tell you. What does dxcc do? I don’t really know. Should you bother installing it? I haven’t a clue! :mrgreen:

But this is kind of cool too!


A graphical version! I’ve never been so excited about something I don’t understand at all! 😀

aspell: A spellchecker at the console

I’m into a short slew of software that I’ve worked with for quite a while, but want to mention again.

It’s always good to go over old ground. You never know what you’ll notice. Here’s aspell again:


Animated, just for fun. 🙂

I ran into aspell first when I made the shift to charm a few years ago. I brought it out again a few weeks ago for reference and kept it around for a while.

Dictionaries abound in Linux, and aspell makes for a very nice frontend.

Simple word-by-word checks, custom dictionaries, one-key replacement and correction, the ability to ignore or replace words document-wide … all the features you would expect in a standard spellchecker.

Best of all it is light as a feather and can practically nuzzle up to any other application without causing a scene.

Personally, I plan to incorporate this, vim and pip into something vaguely like a homemade word processor. We’ll see how that goes. … 🙄