Skip to main content

convert Kanji in Japanese into Kanji attached with Hiragana (Furigana(振り仮名)). For example, "澱んだ街角" => "澱(よど)んだ街角(まちかど)"

Project description

furigana
========

Generate furigana(振り仮名) from Japanese

It uses `MeCab <http://taku910.github.io/mecab/>`__ (a Natural Language
Toolkit) to split Japanese into words, and superscript it with furigana
(振り仮名).

Example:
--------

input
~~~~~

::

print_plaintext('澱んだ街角で僕らは出会った')

output
~~~~~~

澱(よど)んだ街角(まちかど)で僕(ぼく)らは出(で)会(あ)った

input
~~~~~

::

print_plaintext('お茶にお煎餅、よく合いますね')

output
~~~~~~

お茶(ちゃ)にお煎餅(せんべい)、よく合(あ)いますね

Usage
-----

::

$ python3 furigana.py '活版印刷の流れを汲む出版作業では'

Dependency
==========

See https://pypi.python.org/pypi/mecab-python3/0.7 run below commands on
ubuntu

::

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

Conflict with Anaconda Python
==========
Please use Ubuntu's original python3, not to use with Anaconda Python3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for furigana, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size furigana-0.0.6.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page