Hayanyuu version 2



I added the compound search.

It’s still a little buggy. Especially visually.

But it works. It’s already saved me a bit from having to draw kanji.

How it works:

Hayanyuu will download edict2 and radkfile.

The prompt appears and there are now two special keys. They need to surround a query (so as to save time, because it’s pretty slow to look things up). The keys:

Get radical information about KANJI (can be a compound too).

`radical1 radical2 - & . *`
Look up an edict2 entry.

Radicals are looked up as ALIASES. I wrote all these aliases myself, and you probably want to change a lot of them. I myself will change a lot of them too, because I haven’t used it too much. I’ll post updates in new blog posts.

?KANJI? tells you what radicals and what aliases are associated with it. Example:

Romaji> ?週刊?
冂 lid
込 move
口 mouth
口 kuchi
土 earth
刈 cut
干 dry

You can see that a radical can have multiple entries.

In the aliases table you can just copy a line and change the alias.

Multiple radicals can have the same alias too.

Now for compound entry…

Basically you give a list of kanji that form a compound / edict2 entry.

You can give:

  • kanji
  • radicals
  • hiragana (in CAPITALS)
  • a repetition sign (the & (AMPERSAND))
  • a wildcard (the . (DOT))
  • and a glob (the * (ASTERISK)).

Everything needs to be separated with spaces.

Radicals are the only ones that can be multiple words. They are terminated with a – (MINUS).

A simple example with one kanji and one wildcard:

Romaji> `干.`
F1: 干し
F2: 干す
F3: 干る
F4: 干与
F5: 干城
F6: 干場
F7: 干天
F8: 干害
F9: 干戈
F10: 干拓
F11: 干支

`干 SU` would then just give 干す.

干 is itself a radical aliased to dry, as seen above. Let’s look at other kanji that have that radical that also end in SU:

Romaji> `dry - SU`
F1: 干す
F2: 平す
F3: 揺す
F4: 許す

Its power shines with big compounds, e.g. 一般論:
Romaji> `one - cross - satu -`
F1: 一般論
F2: 整数論

With just 1 radical per kanji you can find a complex compound.


I made it use xdotool by default (so results are always typed), because the command needs to be pretty complex to work 100% of the time. It also copies to the X buffer.
If you liked the old stdout method, let me know and I’ll add an option.


Here is the TODO list explained:

# Inter-session scratchpad
Just one extra line where previous hits are stored / shown. It would need an .rc file.

# Sort edict2 by popularity
To avoid getting useless hits shown up first. This might work with kanjidict’s F-rating. Giving each edict2 entry a score per kanji in it.

For the compound search:
# More aliases
Depends on other users. Share your entries. Note that aliases have to be [a-z]. No numbers. Also note that the radicals displayed sometimes are kanji that just contain that radical: 込 refers to the 3-stroke movement radical.

# Radical termination sign (no more than these radicals)
This actually needs kradfile, I think… Pretty tricky. Some kanji have a deceptive amount of radicals. For example: did you expect 許す above?

# Search by ON/KUN
Of course, you can already do this with regular hayanyuu, but it’d be nice to have inside the compound lookup. Would need another special mark to indicate it as such.


Bear in mind that you’re searching for edict2 entries and not for single kanji.

If a kanji is only used as a verb or in compounds, then either give the hiragana ending or other kanji too. Or use “*”. It should cap to the end of an entry.


You will notice two function that are really cool. I’ve had them for a while too:
set_union and set_intersection.

I also wrote a set_complement, but haven’t found a good use for it.

I had to improve set_intersection, but otherwise they’re really old. They can be improved a lot further! I didn’t want to mess with it myself, since they work. Look over it, if you can improve it let me know (should be a fun challenge).


Otherwise I have been translating a lot. That’s why I wanted to add this functionality fast. Because I was getting RSI from drawing kanji with my mouse!

I downloaded the latest gimp, but I haven’t tried it yet. I have done manga chapters myself now, from translating to typesetting. I hope gimp works nicely with paintshop pro though, for when I want to work with other groups. One problem I’ve had is that I can’t re-edit .psd files I saved. But PS users seem not to have that problem with my .psd files…

I started playing DEJA by Elf for Windows in Japanese with AGTH + JParser and Mecab. It’s going very well. Great game. Love that Snatcher/Policenauts gameplay and feel.

I also can’t wait for the YU-NO translation to come out (also by Elf). The demo patch was great. Sometimes I boot up the game just to get a feel for it again.

I’ve also played some Japanese games from this yuri site:


They’re all free and seem to work well with AGTH.

This entry was posted in edict2, Programming, Translations. Bookmark the permalink.

2 Responses to Hayanyuu version 2

  1. karol says:

    You can give:
    hiragana (in CAPITALS)
    a repetition sign (the & (ASTERISK))
    a wildcard (the . (DOT))
    and a glob (the * (STAR)).

    ‘&’ is called an ampersand, asterisk is another name for the star ‘*’:

  2. procyon says:

    Thanks, Karol. And thanks for reading my blog. I’ll try updating a bit more often.

Comments are closed.