Archive for January, 2007

KLookup release!

Monday, January 29th, 2007

This post I’m translating from English to Japanese.

このポストに英語から日本語に訳します。

I made a release of KLookup! The second release. Aptly named 0.2 (the first release was called 2006-11-26).

KLookupをリリースでしたよ!二番のリリースだから0.2と呼びます(一番は2006-11-26と呼びました)。

KLookup is my fabulous final year project. It’s coming along really well.

KLookupは俺のすばらしい最後の年のプロジェクトです。中々上達しています。

The easiest way to install it is (with RubyGems):

優しい方法は(RubyGemsで):

gem install klookup

Also, you can check it out via Subversion:

だって、Subversionでもチェックオウトできます。

This release (このリリース): svn co svn://rubyforge.org/var/svn/klookup/tags/REL_0.2 klookup-0.2

The trunk (幹?トランク?胴体?分かりません!): svn co svn://rubyforge.org/var/svn/klookup/trunk klookup

KLookup comes up as the only result for kanji on RubyForge, which is somewhat interesting due to a slight Japanese focus of Ruby in general. It’s quite possible that this sort of tool just wouldn’t be particularly useful to the average Japanese person who’s completed twelve years of education and maybe university.

kanjiを探せばKLookupは只一つの答え。それは面白いとおもいます、Rubyはちょっと日本に中心するから。もしかしてこんな道具は役に立ちませんかな、なみの十二年間の学校や大学校を受けた日本人に。

Ugh. I really need to make a blog CMS myself soon…one that is language-aware.

ああ、もう早いに言語を気がついてるブログCMSを作らなければ成りませんなぁ。

教育漢字

Sunday, January 28th, 2007

My latest goal is to learn the first three grades of 教育漢字 (educational kanji) before March. My next goal will be to learn the following three grades before some other realistic deadline.

教育漢字 is a non-coded character set containing 1,006 characters, which are taught to children in 小学校 (little school). The first three grades contain a total of 440 characters.

I’ve already learnt all of the characters in grade one (80 characters) - I only needed to learn one I didn’t recognise and a few I couldn’t remember how to write. Grade two (160 characters) looks like it may take a little more work.

Maybe when it gets closer to December I’ll start learning kanji based on JLPT character sets.

Ruby Unicode String Fun

Monday, January 8th, 2007

RUnicode is coming along nicely.

I just implemented a few methods for String. One was String#blocks, which returns the names of the blocks codepoints belong to.

  # "今日はトム君。Niall is a ☆.".blocks
  # => ["CJK Unified Ideographs", "CJK Unified Ideographs", "Hiragana",
  # "Katakana", "Katakana", "CJK Unified Ideographs",
  # "CJK Symbols and Punctuation", "Basic Latin", "Basic Latin",
  # "Basic Latin", "Basic Latin", "Basic Latin", "Basic Latin", "Basic Latin",
  # "Basic Latin", "Basic Latin", "Basic Latin", "Basic Latin",
  # "Miscellaneous Symbols", "Basic Latin"]

And then I decided Ruby needed a real String#upcase and String#downcase. The original String#upcase just transliterates ASCII.

The operation is locale insensitive—only characters “a’’ to “z’’ are affected.

My version performs simple uppercase mappings according to the data found in UnicodeData.txt. Although it takes about a year to do it.

  # "天空のエスカフローネ Tenkū no Esukafurōne, wörtlich".upcase
  # => "天空のエスカフローネ TENKŪ NO ESUKAFURŌNE, WÖRTLICH"

String#downcase just calls String#upcase to do its dirty work. And String#upcase! and String#downcase! just use String#replace.

This Ruby Unicoding is rather fun. It’s a good language to work with. It’s just so hackable. Maybe the next step should be to work out how to get String#upcase running in a timeframe similar to the original String#upcase, and then I might like to make some Ruby extensions in C. Although I’m not fond of C, I do think it’s a good choice for low-level things, and this is indeed low-level stuff.

RUnicode started out as one method I needed for my KLookup final year project. It’s growing a little, but I’m keeping it in the KLookup source tree for now. You can check it out with the following command:

svn checkout svn://rubyforge.org/var/svn/klookup

There’s a cute little demo in demo/ which makes use of the String#tr method (which is also available in jcode, I discovered) to convert Arabic numerals into (Japanese-style) kanji numerals. There’s a shell script to print the date from the Ruby script:

二千七年一月八日

It only goes up to (10**26)-1 at the moment. If you’re interested, (10**26)-1 (that’s a nine followed by 25 nines) looks like this:

九万九千九百九十九億九千九百九十九万九千九百九十九兆九万九千九百九十九億九千九百九十九万九千九百九十九

Enough babbling, goodnight.☆

会いたかった

Monday, January 8th, 2007

会いたかったです。みんなに。

ちょっと前に日本語授業へ出かけましたがキャンセルでした。橋戸先生が病気ですから。仕方がないでも楽しみましたから今、残念です。

こんな事の所為でよく楽しみません。なんか寂しいですよね。

じゃ、一人で日本語を勉強しますから。

あけましておめでとう

Monday, January 1st, 2007

I started my year by eating おせち料理 (New Year food), watching anime (魔法騎士(マジックナイト)レイアース - Magic Knight Rayearth), and counting-down on xclock -update 1 (of course my clocks are set by OpenNTPD - I wish my mobile and large-display LCD clock could do the same).

I ate 年越しそば (year-crossing soba), もち (mochi), and 梅干し (umeboshi). Super-yummy.

前に大掃除した。部屋の全部を掃除した。そう言う事はなかった。

じゃ、もうすぐ練らなきゃ。