NihongoBot

The Bot:

NihongoBot is an instant-messenger robot that can perform lookups from the EDICT Japanese-English/English-Japanese dictionary. It uses the XMPP IM protocol, which is also compatible with Google Talk. I made this out of frustration with having to keep desktop translation software on every computer I used. While the EDICT web interface is very useful and complete, this is a bit faster and more interactive. And in contrast to desktop translation software, it works the same on every platform.

To use it, just add "nihongobot@redundancy.redundancy.org" to your contact list and send it a message. To translate a word just issue the command "search <a word>", or just type a word you want to translate. Japanese must be input either in Kanji or Kana. Romaji is not supported.

The software:

Nihongobot is written in Python and based on the xmpppy library. Much of the code is from the xmpppy's bot.py. Source code is available here.

The FAQ:

  1. "Why isn't [my favorite IM protocol] supported?"

    XMPP, while far from perfect, was chosen because of its status as an open, freely-available standard. There are many free Jabber services one can use, and a wealth of available clients, notably Pidgin (Unix and Windows) and Adium (MacOS X). While other protocols have better market penetration, Yahoo and AOL have a long history of changing protocol details without notifying anyone, which would cause a bot written to use them to break periodically. Besides, while I could pick AIM over Yahoo and annoy all the Yahoo users, this way I get to annoy almost everyone.

  2. "The answers back from Nihongobot are all garbled!"

    If you're getting back mojibake, then it's likely that your IM client or operating system doesn't support UTF-8. Sadly, I cannot help you configure this, but you may find some pointers here.

  3. "Nihongobot can't find any word I put in!"

    See 2 - it's probably the same problem. On the other hand, if you're getting an error message like Unknown command "?otr:aaicaaaaxk8uogggtxdu9djfdv/omgdb+vj0", then this is probably an Adium problem. Click the lock icon, then go to "Encryption Settings" and "Disable Chat Encryption". You'll need to do similarly in Pidgin if you're set to auto-initiate OTR chats.

  4. "How do I input in Japanese?"

    I can't help you with this - I have enough trouble getting my own computer to behave how I want, so it's very unlikely I can fix yours. Please see 2.

  5. "Will you support romaji?"

    Probably not. I dislike romaji, and think that learning kana is a better idea. That said, I may end up doing it at some point, but it's not a priority.

  6. "Any plans to support other languages?"

    Not really, as English and Japanese are the only things I speak. However, given a flat file dictionary, it'd be pretty trivial to modify Nihongobot to work with other languages.

The Disclaimer:

This is provided as a free service, and the software is in the public domain. I am not responsible for any ill effects of using the service, the software, or any support of either.

Please do not abuse this service. I'm hosting it so that people unable to run it themselves can still use the software. It hasn't been thoroughly optimized for performance and probably has bugs and is easily DoSable. Any obnoxiousness or spamming will at least be blocked, and will most likely result in switching to manual registration, which will suck for everyone. That said, feel free to contact me at lx [a@t] redundancy.redundancy.org via e-mail Jabber with any feedback or bug reports.

The Screenshot:



Updated Sun Jan 20 16:16:32 PST 2013