Python implementation of kakasi - kana kanji simple inversion library
Project description
Overview
pykakasi is re-implementation of kakasi library (original is written in C) in Python.
pykakasi at glance
Install:
pip install pykakasi
Sample source code:
from pykakasi import kakasi,wakati
text = u"かな漢字交じり文"
kakasi = kakasi()
kakasi.setMode("H","a") # Hiragana to ascii, default: no conversion
kakasi.setMode("K","a") # Katakana to ascii, default: no conversion
kakasi.setMode("J","a") # Japanese to ascii, default: no conversion
kakasi.setMode("r","Hepburn") # default: use Hepburn Roman table
kakasi.setMode("s", True) # add space, default: no separator
kakasi.setMode("C", True) # capitalize, default: no capitalize
conv = kakasi.getConverter()
result = conv.do(text)
print(result)
wakati = wakati()
conv = wakati.getConverter()
result = conv.do(text)
print(result)
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” , “Kunrei” or “Passport” as mode “r”, Roman table switch. Also “s” used for separator switch, “C” for capitalize switch. “S” for separator storing option.
wakati is an implementation of kakasi’s wakati gaki option.
Documentation
Manual is placed on readthedocs.
Copyright and License
Copyright 2010-2019 Hiroshi Miura <miurahr@linux.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykakasi-0.95.tar.gz.
File metadata
- Download URL: pykakasi-0.95.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb1f99539fce5907c8a368d402679950e4dc581aba4d5ac2bb4c099473ab8d27
|
|
| MD5 |
190e789ecec96a8d23c641d673723cb4
|
|
| BLAKE2b-256 |
3dc677d122a5e19500519c03c8f2a91414914ee55d258f8b8aaa316726707da0
|
File details
Details for the file pykakasi-0.95-pypy-none-any.whl.
File metadata
- Download URL: pykakasi-0.95-pypy-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python p.y
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 PyPy/5.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9abd47b373c8d22d5e7e18b631b3c23ba97d51b3ea3c967e4a3d46d937618062
|
|
| MD5 |
7cda43bde01aa9ecca8cc3635f19f984
|
|
| BLAKE2b-256 |
cda380e49f0ac2bbdade4ec7d215ebfcf4855fb9b727342238a3014b1daa625b
|
File details
Details for the file pykakasi-0.95-py35-none-any.whl.
File metadata
- Download URL: pykakasi-0.95-py35-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3.5
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82ad294b642b61ee24bf3865f4f04aae116d6c34c734adc2234042c33ffa62cc
|
|
| MD5 |
6fb5c9aa2c10ca6dab514242b85e0124
|
|
| BLAKE2b-256 |
4ac8109e774f6fa92a7cfaf4fafde0800d0819a57477ad3668e74f3267cc220e
|
File details
Details for the file pykakasi-0.95-py3-none-any.whl.
File metadata
- Download URL: pykakasi-0.95-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c61740043debe318fa0bd6218bfa01c9c6e51d5301d3f5b0be4444623d428e7e
|
|
| MD5 |
60aa5d064aa1735337a01c180db8f57b
|
|
| BLAKE2b-256 |
3e2fde2953e9be2b4e595188d2201438ed0c5187dd69df6afd929bd82a8aa800
|
File details
Details for the file pykakasi-0.95-py2-none-any.whl.
File metadata
- Download URL: pykakasi-0.95-py2-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79382b66b88bac98b4a63f241de2e107d7142d58bed9ea1346d98449a0e8d248
|
|
| MD5 |
c877f8edfc5d55bc03c9ac55d4680a95
|
|
| BLAKE2b-256 |
e487df772bba5b72fd9fcb193d508ba597bbfe888071c363efa801a2bbb08480
|