1

I want to convert kanjis to kana on Linux.

  • Input: kanji, for instance 東京特許許可局
  • Output: most probably kana, for instance トーキョートッキョキョカキョク
  • Must run on Linux and be free, ideally open source.
1

Mecab is pretty accurate for this.

It is open source.

Installation

On Ubuntu 2015.10:

sudo apt-get install mecab libmecab-dev mecab-ipadic mecab-ipadic-utf8

Yes you ned all of these packages, the mecab package alone won't do.

Usage

echo 東京特許許可局 | mecab
東京    名詞,固有名詞,地域,一般,*,*,東京,トウキョウ,トーキョー
特許    名詞,サ変接続,*,*,*,*,特許,トッキョ,トッキョ
許可    名詞,サ変接続,*,*,*,*,許可,キョカ,キョカ
局      名詞,接尾,一般,*,*,*,局,キョク,キョク
EOS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.