KAKASI(1)
π KAKASI(1) β hey bestie, welcome to the kanji-kana group chat π
β¨ NAME β¨
KAKASI β Kanji kana simple inverter (between Kanji, both Kana and Romaji)
π SYNOPSIS π
kakasi [options] [jisyo1 [jisyo2 [jisyo1,,]]]
πΈ DESCRIPTION πΈ
okay so Japanese sentences are often a whole mix of Chinese characters (Kanji), Kana (Hiragana and Katakana), and Romaji (Latin phonetical pronunciation). KAKASI converts between these four different ways of writing Japanese. π
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 standard input (stdin), then it is translated and output to standard out (stdout). In the following example the "bunchu" Kanji is converted into Hiragana.
kakasi -JH < document
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.
kakasi -w < document
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 -l4 < document
KAKASI can also 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 displays the following character sets with their bracket mnemonic:
- ASCII (
a) β Known as "ascii" character set. - JISROMAN (
j) β Known as "jis roman" character set. - GRAPHIC (
g) β It is the DEC graphic character set. - Katakana (
k) β JIS x0201, defined as part of the GR character set.
As a matter of convinience, JIS x0208 is divided as stated below.
- Kanji (
J) β JIS x0208 characters included between 16 and 94 sections. - Hiragana (
H) β JIS x0208 characters included in section 4 (Hiragana) - Katakana (
K) β JIS x0208 characters included in section 5 (Katakana) - Sign (
E) β JIS x0208 characters included in section 1,2,3,6,7, and 8. (Note that section 9-15 are undefined in JIS x0208.)
Translation between the following character sets are available.
- ASCII -> JISROMAN, Sign
- JISROMAN -> ASCII, Sign
- GRAPHIC -> ASCII, JISROMAN, Sign
- JISx0201 Katakana -> ASCII, JISROMAN, Kana, Hiragana
- Sign -> ASCII, JISROMAN
- Katakana -> ASCII, JISROMAN, JISx0201 Katakana, Hiragana
- Hiragana -> ASCII, JISROMAN, JISx0201 Katakana, Kana
- Kanji -> ASCII, JISROMAN, JISx0201 Katakana, Kana, Hiragana
With conversion of ASCII and the JISROMAN the alphabetical character conversion is done from JISx0201 Katakana, Katakana, Hiragana and Kanji.
Example:
- All kanji characters are converted to Hiragana.
kakasi -JH
- All JIS x0208 characters are converted to JIS X 0201.
kakasi -Hk -Kk -Jk -Ea
- All characters are converted to JIS X 0208.
kakasi -aE -jE -gE -kK
- All characters are converted to ascii and words are separated.
kakasi -Ha -Ka -Ja -Ea -ka
- Exchange between Katakana and Hiragana characters.
kakasi -HK -KH
π₯ CONVERSION DESIGNATED CHARACTER SET π₯
Some character sets are categorized by kakasi and indicated by following mnemonics: a, j, g, k, E, H, K, J.
a--- ASCII charactersj--- JIS ROMAN ( nearly equal to ASCII,"~"and"different ) defined by JIS x0201g--- DEC Graphic Charactersk--- 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)
to\from| 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.
π§ KANJI CODING CONVERSION π§
Unfortunately, several coding systems are used in Japan and JIS x0208 standard are changed at 1983. Therefore, KAKASI can automatically distinguish the coding system and coding revision and then use the same output coding system if the document does not include JIS x0201 KATAKANA. If JIS x0201 KATAKANA is included or you wish to change kanji coding system, you may use the next options. π
-iβ input coding-oβ output codingjisβ Widely used on the internet. (Ex: fj, jp, .. newsgroups) Derived from ISO-2022 coding manner.newjis: JISx0208 (1983) invoked byESC-$-B.oldjis: JISx0208 (1978) invoked byESC-$-@.euc,decβ Often used in UNIX like computers. JISx0208 is assigned to GR ( MSB is 1 ). The major difference betweeneucanddecis assignment of JISx0201 KATAKANA and the DEC graphic character.sjisβ Defined by Microsoft Corp. Widely used on the personal computers ( MSDOS, Mac, .. )utf8β Current international standard. All modern OSs use this encoding of the Unicode character set as the default.
π ROMAJI CONVERSION π
Kanji kana conversion options. Used with -J? option. There are 2 types of Romaji writing. The first is the Kunrei method defined by Japanese government, and the second is the Hepburn method. I think Hepburn method sounds naturally to foreigners.
-rhepburnβ Hepburn Method (default)-rkunreiβ Kunrei Method
π OTHER OPTIONS π
-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. ( defaultTABCRLFBLANK)-Cβ Capitalize Romaji word (with-Jaor-Jjoption)-Uβ Upcase romaji word (with-Jaor-Jjoption)-uβ Callfflush().-wβ wakatigaki mode. 'wakatigaki' is word segmentation for Japanese sentences.
π DICTIONARIES π
KAKASI can accept additional dictionary to the system dictionary. The acceptable format of additional dictionary is SKK format, and Wnn format, and so on. Namely, each record is one line with two fields, Yomi (reading) and Jukugo(idiom). Fields are separated with commas (or TAB, or blank). The kanji code is restricted to JIS or EUC. See another document named JISYO for more details.
π ENVIRONMENT VARIABLES π
The behavior is affected by the following environment variables.
KANWADICTPATHβ Specifies a path of kanwadict (full-path including filename). Default value is$prefix/share/kakasi/kanwadict.ITAIJIDICTPATHβ Specifies a path of itaijidict (full-path including filename). Default value is$prefix/share/kakasi/itaijidict.
π AUTHOR π
Written by Hironobu Takahasi <takahasi@tiny.or.jp>.
π¦ FILES π¦
$prefix/share/kakasi/kanwadictβ It is a binary dictionary of KAKASI. It is automatically converted from kakasidict by mkkanwa when the package is installed.
β SEE ALSO β
mkkanwa(1)
π DIAGNOSTICS π
Return status except 0 when there is any trouble.
π BUGS π
Report bugs to KAKASI Project kakasi-dev@namazu.org. Please DO NOT CONTACT to the originator (Takahasi-san).
π NOTE ABOUT ENGLISH MANUAL π
The content of English manual is not exactly same as that of Japanese manual.
okay that's the whole page, bestie π this footer energy is 4.3 Berkeley Distribution / LOCAL (and there's no date listed), so go convert some Kanji and slay π
β¨
π¦ where this page comes from
- arch rolling: kakasi 2.3.6-4 Β· GPL-2.0-or-later
- fedora 43: kakasi 2.3.6-34.fc43 Β· GPL-2.0-or-later
- fedora 44: kakasi 2.3.6-35.fc44 Β· GPL-2.0-or-later
- nixos 26.05: kakasi 2.3.6
- nixpkgs unstable: kakasi 2.3.6
- opensuse-leap 16.0: kakasi 2.3.6-bp160.1.17 Β· GPL-2.0-or-later
- opensuse-leap 16.0: kakasi 2.3.6-bp160.1.17 Β· GPL-2.0-or-later
- opensuse-leap 16.0: kakasi 2.3.6-bp160.1.17 Β· GPL-2.0-or-later
- opensuse-leap 16.0: kakasi 2.3.6-bp160.1.17 Β· GPL-2.0-or-later
- Copyright (C) 1992 Hironobu Takahashi (takahasi@tiny.or.jp)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms