Skip to main content

Python implementation of kakasi - kana kanji simple inversion library

Project description

Pykakasi library
==================

pykakasi is re-imprelemtation of kakasi library by Python.

How To Use pykakasi
------------------

```python
import pykakasi.kakasi as kakasi

kakasi = kakasi()
kakasi.setMode("H","a") # default: Hiragana -> Roman
kakasi.setMode("K","a") # default: Katakana -> Roman
kakasi.setMode("J","a") # default: Japanese -> Roman
kakasi.setMode("r","Hepburn") # default: use Hepburn Roman table
kakasi.setMode("C", true) # default: Separator
kakasi.setMode("c", false) # default: no Capitalize
conv = kakasi.getConverter()
result = conv.do(text)
```

You can use output `Mode` values from "h", "k", "a" which is each means
"Hiragana", "Katakana" and "Alphabet".
For input, you can use "J" that means "Japanese" that is
mixture of Kanji, Katakana and Hiragana.
Also there is values of "H", "K" that means "Hiragana", and "Katakana".
You can use "Hepburn" or "Kunrei" as mode "r", Roman table switch.
Also "C" used for separator switch, "c" for capitalize switch.


Options
-------------------

These switch alphabets are derived from original Kakasi.
Now it support following options:

| option | description | possible values | note |
| ------ | :---------- | --------------- | :---------- |
| "K" | Katakana convertion | "a" or None | roman or noconversion |
| "H" | Hiragana convertion | "a" or None | roman or noconversion |
| "J" | Kanji conversion | "a", "h", "k", or None | roman or Hiragana, Katakana |

Project details


Download files

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

Source Distribution

pykakasi-0.1.tar.gz (1.0 MB view hashes)

Uploaded Source

Built Distribution

pykakasi-0.1-py2.7.egg (2.5 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page