YU-NO

Yesterday YU-NO was released, which I’ve talked about before, and I’m now in the process of marathoning it.

It works in Virtualbox, but while the picture is 640×400 the resolution of the game is 640×480, so fullscreen at 640×400 shows a black bar and half the picture.

Scale Mode works well. I’m a bit worried about lag though. It’s not a demanding game, but it does have animations sometimes. So far it’s been okay…

wmctrl can scale the window exactly right. For my 1600×900 display:
wmctrl -v -r VirtualBox -e 0,80,-90,1440,1080
It will scale the 640×400 picture to 1440×900. And put the 640×480 (now 1440×1080) window in the center of the screen.

wmctrl needs a hack to work with negative numbers, just comment out these lines:
(main.c:858)

if (wm_supports(disp, "_NET_MOVERESIZE_WINDOW")){
return client_msg(disp, win, "_NET_MOVERESIZE_WINDOW",
grflags, (unsigned long)x, (unsigned long)y, (unsigned long)w, (unsigned long)h);
}
else {
p_verbose("WM doesn't support _NET_MOVERESIZE_WINDOW. Gravity will be ignored.\n");
// if ((w < 1 || h = 0 && y >= 0)) {
// XMoveWindow(disp, win, x, y);
// }
// else if ((x < 0 || y = 1 && h >= -1)) {
// XResizeWindow(disp, win, w, h);
// }
// else if (x >= 0 && y >= 0 && w >= 1 && h >= 1) {
XMoveResizeWindow(disp, win, x, y, w, h);
// }
return EXIT_SUCCESS;
}

manga

Yumihari is on hold during all this. I’m halfway through Chapter 4. Chapter 1-3 are on my mediafire account.
I’ll work on new chapters of Saki and Achiga-hen as soon as they’re released (week 2 of October).
Saki is going very well, really love this series and it’s fun to work on and only takes me a few hours.
Achiga-hen is amazing! I can really recommend it since it’s just started. Even though it’s a lot of work for me, I really hope future chapters will continue to be >40 pages.
A new Hoshikawa Ginza will be released October 12, but the scans won’t be out till 2 weeks after.

Posted in Programming, Translations | 1 Comment

Small updates

hayanyuu

I will post new versions of Hayanyuu on the forums:

https://bbs.archlinux.org/viewtopic.php?id=122264

So far it’s just fixing the UI. It can search English meaning too now.

mplayer

I’ve made a small .cue reader / player. It’s not interactive. You have to control it with “cueplayer COMMAND”. Session information is stored in ./session. **/* is used to find .cue sheets so run it in the right directory.

http://sprunge.us/NjXW (outdated)

It’s not even close to finished. It was interesting working with mplayer -slave mode. I’m not sure if I’m using it correctly though.

gaming

Whenever I post about a game idea, it’s just to forget about it. As for playing games, I haven’t continued with De Ja much. There were quite a few good English VN releases, so I’ve been busy with that.

manga

I wasn’t able to find help with Yumihari. I have 2.5 chapters done. I think I’ll post it in volumes. I haven’t worked on it in the last two weeks, because I felt more like translating other stuff.

system monitor

I’ve written another system monitor. My previous one was a graph with gnuplot (it’s in community contributions). Now it’s just a small table. It has one more bug I’ve been too lazy to fix and then I’ll post it somewhere. Probably in “Handy command line…”

Here it is anyway:
http://sprunge.us/WIBN (outdated)

It has three colums: current | lowest last minute | highest last minute

TIMER is shown for certain sleep commands like sleep 1m or sleep 1h.

Posted in edict2, music, Programming | 2 Comments

Hayanyuu: Limitations

I had another idea for Hayanyuu where the compound search mode was integrated with the regular mode.

And where you don’t have to type aliases but where you selected categories.

E.g. instead of typing hito for the group of radicals 人化个 you would enter category “Animate”, item “Human”.

Both were problematic.

1. Searching edict for a group of kanji followed by the pronunciation of a kanji requires checking two columns separately with no clue as to what part of the column to check.

Example: 人間 (ningen)

Relevant part of edict entry:
人間 [にんげん]

A combined search of 人 + げん is difficult. It would have to look like this:
KCA=kanji-column-anchor
PCA=pronunciation-column-anchor
grep {KCA}人.*{KCA}.*{PCA}.*げん{PCA} edict2.utf

This is hard to do without telling the user to sort out what goes where, but that itself requires writing the tools to do that too.

It’s valuable to have this method for looking up compounds of which you know only part of the pronunciation. But not worth implementing when you can just enter the radicals instead.

You will notice a search like “人gen” does not work in jisho.org either.

2. The category approach was basically me reaching out for users. A way to make the application easier and friendlier.

Categorizing was fun. I will leave you with the list I came up with at the end. I put more work into it than the aliases (which by the way are all sorts of off). And I believe the method had merit for me too.

The major problem was that grouping radicals meant massive amounts of resultant kanji.

The implementation I was going for turned numbers into such a group. E.g. just typing 11 would turn into a group of radicals for “Animate / Human” which would then turn into a group of kanji. I wasn’t sure whether to make the radical list editable. It would be a chore for the user to have to fix that every time anyway. Anyway, I didn’t continue with it, because it needed the same clunky tools of the old version with radical-to-kanji separators and such.

I also tried a single-character alias approach, the implementation of this is simpler, but it’s much harder on the user unless I can think of a more mechanical method.

For now I will continue using version 2. Maybe try making a VB or Javascript port. I don’t know anything of either language though.

Here is the list of categories. It’s fun to work on, and can be improved, but I don’t know if it has practical use, since I never got to test it out properly. I provided a kanji counting command, which should work if you change “hayanyuu” to the right filename and have an radkfile.grep.utf (try the hayanyuu directory ~/.config/hayanyuu/). I don’t know at which “kanji count” a group becomes unpractical, but some are surely too high.
http://sprunge.us/dRFG

Other news.
Today I started translating a manga by Tomizawa Hitoshi. This is a tough one, so I really want to work together with someone. I have someone in mind, but haven’t contacted them yet. I’ll send them the first chapter when I’m done. Very exciting.

By the way gimp 2.7 devel is pretty nice. But that colored dot when you start free-select is annoying, and what really pisses me off is that when you move a text box a tiny bit it will go from Fixed to Dynamic which makes it lose its shape, so it turns into a long line where before you had carefully measured it to a text bubble. I think the older gimp had that too, but it didn’t happen as often.

Posted in edict2, Programming | Comments Off

Hayanyuu version 2

Download:

http://sprunge.us/UEOW

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:

?KANJI?
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> ?週刊?
KANJI 週
冂 lid
込 move
口 mouth
口 kuchi
土 earth
KANJI 刊
刈 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.

———————————-
OTHER CHANGES
———————————-

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.

———————-
TO DO
———————-

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.

——————-
NOTES
——————-

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.

————————————–
OTHER COOL THINGS
————————————–

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

————
BLOG
————

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:

http://www42.tok2.com/home/girlsparty/games.htm

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

Posted in edict2, Programming, Translations | 2 Comments

Simple Japanese IME: hayanyuu

The IME is about done.

http://sprunge.us/QbgV

It will download edict2 automatically to $XDG_CONFIG_HOME/hayanyuu

It needs kakasi-cvs for UTF8 conversion of hiragana -> katakana.

It no longer needs mecab. Instead the usage is a little different:

Let’s say you want to type:

例大祭の読み方はレイタイサイ

You begin typing: “reitaisai” and it finds it in edict2 indicated by F3. You press it and it’s added to the “line so far”. Then you type “no”, F1 (hiragana). “yomikata” -> F3. “ha” -> F1. “reitaisai” -> F2 (katakana). “Enter” to echo the “line so far” to stdout.

Inflections are harder. Maybe in a future version I’ll find a better way to do it, but now, just type the base verb/adjective (as it appears in edict2) and add the inflection after it with hiragana. Then remove the redundant base inflections afterwards. E.g.:

言って

“iu” -> 言う. “tte” -> F1. Enter. Remove u

Lastly, here is another hint for xbindkeys:
"xterm -e 'hayanyuu >/tmp/hayanyuu_latest'; xdotool type "$(cat /tmp/hayanyuu_latest)""

So you don’t even have to paste it.

Posted in edict2, Programming | 1 Comment

Fullscreen IME preview

I have made a small start to the IME.

What I would like to have is a “fullscreen IME”. So a stand alone application and not something that has to link in to another process’s text input system.

That way it can have a lot of features, even an entire text editor.

Here is a preview. It needs kakasi-cvs for converting hiragana to katakana (such a shame it can’t do romaji->hiragana), mecab for finding words, and an edict2.utf file for finding kanji.
http://sprunge.us/ZKES

Here is the script for getting the edict family of dictionaries:
http://sprunge.us/TdMC

Example invocation (hayanyuu is what I think I’ll call the fullscreen IME)
Copy choice to clipboard:
./hayanyuu | xsel -i
Entry for xbindkeys or a WM keybinding:
urxvt -e ‘hayanyuu | xsel -i’

Usage:
Start typing romaji. Some things will start popping up:
Romaji: what you are typing
F1/Hiragana: entire sentence in hiragana
F2/Katakana: entire sentence in katakana
F3: per mecab divided noun or verb looked up.
F4-F10: alternatives to F3 (not implemented yet)

Type the Function key and it will echo the result to stdout (the menu is written to stderr) so you can pipe it to other processes.

Lots of bugs in F3 right now. It will just pick the first result and only return the base of verbs. Some Xterm/tmux controls might be off.

A day after my previous update was I able to contact J-Yutanpo and give them my Morita-san translations. Very exciting. I’m glad that it’s in more capable hands now, both in terms of fixing my translations and the cleaning / typesetting which I have been saved of. For now, at least, I may not be so lucky with the next thing I work on.

Posted in edict2, Morita-san, Programming | Comments Off

Update

Here is what I am planning on doing / have done recently:

Games: As a kid I played a lot of a computer racing board game series on the MSX called Rune Master.

Take a look at a gameplay video: http://www.youtube.com/watch?v=SQrN54c9Yy0

Both easy to play and program. So that’s something I want to try.

I haven’t ever seen a racing board game for the PC either.

File Managers: I am really satisfied with KingBash. Sometimes I’m still thinking of rewriting it in Bash. I tried it before but I got stumped on a complex Pythonic regex.

One feature that would be nice is a second column that shows a preview (including listing directories) just like Ranger.

The biggest problem with that is that Ranger has a really nice threaded system (I think…) where it will load the data in the background and you can continue browsing without having to wait for something you don’t want to see.

Mplayer wrapper: I would like to be able to see subtitles more easily in the console window. They show up with msglevel=ass=6, but I’m thinking of a cool ncurses UI. It would work like this: mplayer file.mkv | while read -n 1 ch; do … and then rewrite the statusline and only let through ass/subtitle.

Very low priority.

Something else I would like to see is the translator comments. mplayer hides them without an option to show them! They do show up in the console stream. Maybe just highlighting them or “notifying” them up would be nice to have.

Japanese learning: I wrote KanPeke and made a thread about it. I posted about an Anki deck too. But actually, I haven’t used either in months.

I started translating the light novel Ookami-san to Shichinin no Nakamatachi, but stopped after page 18. The Japanese in it was too hard. Really long sentences and tricky words (e.g. hineru used in six instances most with a different meaning from each other, so it’s poetic I guess it’d be called).

Now I’m translating the manga Morita-san wa Mukuchi. I’m at page 85 already! It’s so much fun. And it’s all high school girls talking about daily life (no eloquent narrator).

I often have to draw kanji into ATOK’s kanjipad to identify them, often the same over and over, it’s not the best way to learn kanji. You have to think a lot of how to translate J->E, now when I then hear things in anime that I have translated I become very aware about it.

Actually, I think that that extra bit of awareness, even if it’s just for a few sentences, is really important. If you take for example the audio courses Pimsleur, Michel Thomas or Rocket Japanese, you are encouraged to weeaboo-it-up and talk Japanese. When I used grammar myself, I could follow the Japanese in anime much better. Same for the words I used while listening to those courses. Though the material they use does not occur that often in anime (IIRC).

So maybe I should try writing an E->J learning program?

Morita-san wa Mukuchi: Anyway, I am now almost 75% in to Morita-san volume 1. After that I have to add the text to the RAW.

I’m a noob at both tasks. This might not end well.

A few days ago I noticed J-Yutanpo have done chapter 1, but they decided not to continue: http://pokoteng.wordpress.com/2011/04/03/our-new-project-is/

Their chapter 1 already showed me two errors I made. Not too bad I guess (I’m improving). I’m just glad that so far I got through the sentences that had me stuck for hours. For example with Ookami-san I just could not figure out some sentences at all. That was very depressing.

The tools I use now are the above-mentioned ATOK and standard Windows programs (Wordpad and Picture and Fax Viewer) under VirtualBox. It all kind of depends on ATOK, I just picked the best IME I could find, though I’m not that satisfied with it (Because I’m doing something unusual like copying texts). I never really tried Linux IMEs. I used to like tegaki-recognize but I will have to reevaluate that now that I have used ATOK’s kanjipad.

And it also depends on what program I will use for adding the text to the images. Gimp, photoshop or paint.net? I haven’t ever used the last two, but I will give them a try.

So… that means I have to use Windows for this task.

But… I did post before about making my own IME using radicals. And I came up with a simple way to draw kanji in Kanpeke. I really want to give it a try, but I don’t know how to bring it all together yet.

When Morita-san wa Mukuchi volume 1 is done I’ll post about it here.

Posted in Meta, Morita-san, Programming, Translations | Comments Off

Preview: Japanese Radical Tutor

About something I’m writing to write and learn Japanese.

Continue reading

Posted in edict2, Programming | Comments Off

Update

About gaming, a monitoring app, an mpd client and a file manager. (no actual code)

Continue reading

Posted in edict2, FM, music, Programming, Roguelike | Comments Off

Board game: Force field mages

A board game with force fields and mages

Continue reading

Posted in Programming | Comments Off