Content-type: text/html
This program is useful for those whose terminal or desktop does not support the native display of Japanese. Also this is a great tool for those who are learning Japanese (international students and children etc).
A word can be passed into the standard input (stdin), then it is translated and output to standard out (stdout). In the following example the "bunchu" Kanji is converted into Hiragana.
Since version 2.3.0 text with spaces in-between words has been supported.
In the following example the output has spaces in-between each word.
Since version 2.3.5 level conversion mode has been supported.
In the following example, simple Kanjis are left them unconverted,
and difficult Kanjis are translated into Hiragana.
KAKASI It is possible to convert letters to alphabetical characters. Also Katakana letters in the JIS x0201 character set and the Hiragana in the JIS x0208 character set can be converted between each other.
KAKASI The following character set in brackets which is displayed.
Translation between the following character sets are available.
With conversion of ASCII and the JISROMAN the alphabetical character conversion is done from JISx0201 Katakana, Katakana, Hiragana and Kanji.
1. All kanji characters are converted to Hiragana.
kakasi -JH
2. All JIS x0208 characters are converted to JIS X 0201.
kakasi -Hk -Kk -Jk -Ea
3. All characters are converted to JIS X 0208.
kakasi -aE -jE -gE -kK
4. All characters are converted to ascii and words are separated.
kakasi -Ha -Ka -Ja -Ea -ka
5. Exchange between Katakana and Hiragana characters.
kakasi -HK -KH
Some character sets are categorized by kakasi and indicated by following mnemonics: a, j, g, k, E, H, K, J.
a --- ASCII characters
j --- JIS ROMAN ( nearly equal to ASCII, "~" and " different ) defined by JIS x0201
g --- DEC Graphic Characters
k --- KATAKANA defined by JIS x0201
E, H, K, and J are included in JIS x0208 character set.
J --- KANJI characters of JIS x0208.
H --- HIRAGANA characters of JIS x0208.
K --- KATAKANA characters of JIS x0208.
E --- Rest of above characters of JIS x0208 which includes
alphabets, numbers, symbols and so on.
-(from)(to) means conversion from character set (from) to (to). For example, -JK option causes KANJI characters are converted to HIRAGANA. Combinations in the following table are available. (You must not remember it, because the -h shows same information)
toom| a j k E H K J g
-------+--------------------------------------------
a | - o o1 o o1 o1 o12 o
j | o - o1 o o1 o1 o12 o
k | - o o o2
E | o o - o
H | o - o o2
K | o o -
o -- converted.
1 -- converted to Romaji.
2 -- Kanji -> Kana conversion.
-i : input coding
-o : output coding
jis -- Widely used on the internet. (Ex: fj, jp, .. newsgroups)
Derived from ISO-2022 coding manner.
newjis: JISx0208 (1983) invoked by ESC-$-B.
oldjis: JISx0208 (1978) invoked by ESC-$-@.
euc,dec -- Often used in UNIX like computers. JISx0208 is
assigned to GR ( MSB is 1 ). The major difference between
euc and dec is assignment of JISx0201 KATAKANA and
the DEC graphic character.
sjis -- Defined by Microsoft Corp. Widely used on the personal
computers ( MSDOS, Mac, .. )
-rhepburn : Hepburn Method (default)
-rkunrei : Kunrei Method
-p: List all possible readings. If there exist two or more
possible readings, KAKASI shows them in braces {aaa,bbb}.
-s: Insert a separate character between words.
-f: Furigana mode. Shows the original kanji word with reading.
-c: Skip characters within word. ( default TAB CR LF BLANK )
-C: Capitalize Romaji word (with -Ja or -Jj option)
-U: Upcase romaji word (with -Ja or -Jj option)
-u: Call fflush().
-w: wakatigaki mode. 'wakatigaki' is word segmentation for
Japanese sentences.