Skip to main content

Python implementation of kakasi - kana kanji simple inversion library

Project description

Overview

Documentation Status Travis-CI PyPI version Coverage status Azure-Pipelines

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.

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.96.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pykakasi-0.96-pypy-none-any.whl (2.6 MB view details)

Uploaded Python p.y

pykakasi-0.96-py35-none-any.whl (2.7 MB view details)

Uploaded Python 3.5

pykakasi-0.96-py3-none-any.whl (2.6 MB view details)

Uploaded Python 3

pykakasi-0.96-py2-none-any.whl (2.7 MB view details)

Uploaded Python 2

File details

Details for the file pykakasi-0.96.tar.gz.

File metadata

  • Download URL: pykakasi-0.96.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.15

File hashes

Hashes for pykakasi-0.96.tar.gz
Algorithm Hash digest
SHA256 d9c2bf942a9bb06b63de82e96757e0f7b9c6fca47c7243e6e2f66c264ec9dca4
MD5 5cf1667419165e8e81627840dcca929d
BLAKE2b-256 fe48cda053fd6b16292f11e6fa70e50be34f31441298a4a6c043dcaaab000b2d

See more details on using hashes here.

File details

Details for the file pykakasi-0.96-pypy-none-any.whl.

File metadata

  • Download URL: pykakasi-0.96-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/7.1.1

File hashes

Hashes for pykakasi-0.96-pypy-none-any.whl
Algorithm Hash digest
SHA256 7f4c8688b2e35f247b7d7167fb499d1dc2d9b6ca99a159eb1163f8164caa9f02
MD5 e781e9e64022c09ee2d9edf0cc4df0c2
BLAKE2b-256 c3391ce094edf54b22e97057708381254bda3bf4ec9846789b5cba95b91bc889

See more details on using hashes here.

File details

Details for the file pykakasi-0.96-py35-none-any.whl.

File metadata

  • Download URL: pykakasi-0.96-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

Hashes for pykakasi-0.96-py35-none-any.whl
Algorithm Hash digest
SHA256 2e2488f5987f81101886595ecf9acc93baddc763cca93381b70441fc34fa1723
MD5 a10887ccce3c1f68f9bae4a386d1025b
BLAKE2b-256 05960fdc642bbbdcff19552e8d9b4e75d2c12a3bb32af02e98fc7c1628662b8e

See more details on using hashes here.

File details

Details for the file pykakasi-0.96-py3-none-any.whl.

File metadata

  • Download URL: pykakasi-0.96-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.7

File hashes

Hashes for pykakasi-0.96-py3-none-any.whl
Algorithm Hash digest
SHA256 feed76d55f8fca20e19a2df0a0a2464aff326eda99cc683b801ec4d41144fea0
MD5 6694825d606c69dd1a94836aab6ab239
BLAKE2b-256 4f44fea5edf0ffcdb18d4a9cc9211d3fb4d05516a9aefd9e96d63159e401b936

See more details on using hashes here.

File details

Details for the file pykakasi-0.96-py2-none-any.whl.

File metadata

  • Download URL: pykakasi-0.96-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.15

File hashes

Hashes for pykakasi-0.96-py2-none-any.whl
Algorithm Hash digest
SHA256 633fb9afdc1b001f970f18d99d730b289a105be1f6a41398a3087141b096b0f0
MD5 b725e287cc8e7f257a380f71397c170c
BLAKE2b-256 4e00152b23f84fc3409ccd5adf81c1e76f04a3d1f3415212c6a99eecdb06d5cd

See more details on using hashes here.

Supported by

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