jaconv
jaconv (Japanese Converter) is interconverter for Hiragana, Katakana, Hankaku (half-width character) and Zenkaku (full-width character)
Japanese README is available.
INSTALLATION
$ pip install jaconv
USAGE
See also document
import jaconv
# Hiragana to Katakana
jaconv.hira2kata('ともえまみ')
# => 'トモエマミ'
# Hiragana to half-width Katakana
jaconv.hira2hkata('ともえまみ')
# => 'トモエマミ'
# Katakana to Hiragana
jaconv.kata2hira('巴マミ')
# => '巴まみ'
# half-width character to full-width character
# default parameters are followings: kana=True, ascii=False, digit=False
jaconv.h2z('ティロ・フィナーレ')
# => 'ティロ・フィナーレ'
# half-width character to full-width character
# but only ascii characters
jaconv.h2z('abc', kana=False, ascii=True, digit=False)
# => 'abc'
# half-width character to full-width character
# but only digit characters
jaconv.h2z('123', kana=False, ascii=False, digit=True)
# => '123'
# half-width character to full-width character
# except half-width Katakana
jaconv.h2z('アabc123', kana=False, digit=True, ascii=True)
# => 'アabc123'
# an alias of h2z
jaconv.hankaku2zenkaku('ティロ・フィナーレabc123')
# => 'ティロ・フィナーレabc123'
# full-width character to half-width character
# default parameters are followings: kana=True, ascii=False, digit=False
jaconv.z2h('ティロ・フィナーレ')
# => 'ティロ・フィナーレ'
# full-width character to half-width character
# but only ascii characters
jaconv.z2h('abc', kana=False, ascii=True, digit=False)
# => 'abc'
# full-width character to half-width character
# but only digit characters
jaconv.z2h('123', kana=False, ascii=False, digit=True)
# => '123'
# full-width character to half-width character
# except full-width Katakana
jaconv.z2h('アabc123', kana=False, digit=True, ascii=True)
# => 'アabc123'
# an alias of z2h
jaconv.zenkaku2hankaku('ティロ・フィナーレabc123')
# => 'ティロ・フィナーレabc123'
# normalize
jaconv.normalize('ティロ・フィナ〜レ', 'NFKC')
# => 'ティロ・フィナーレ'
# Convert small Hiragana or Katakana to normal size
jaconv.enlarge_smallkana('わぁい')
# => 'わあい'
jaconv.enlarge_smallkana('きょういっぱい', ignore='っ')
# => 'きよういっぱい'
# Hiragana to alphabet
jaconv.kana2alphabet('じゃぱん')
# => 'japan'
# Alphabet to Hiragana
jaconv.alphabet2kana('japan')
# => 'じゃぱん'
# Katakana to Alphabet
jaconv.kata2alphabet('ケツイ')
# => 'ketsui'
# Alphabet to Katakana
jaconv.alphabet2kata('namba')
# => 'ナンバ'
# Hiragana to Julius's phoneme format
jaconv.hiragana2julius('てんきすごくいいいいいい')
# => 't e N k i s u g o k u i:'
NOTE
jaconv.normalize method expand unicodedata.normalize for Japanese language processing.
'〜' => 'ー'
'~' => 'ー'
"’" => "'"
'”'=> '"'
'“' => '``'
'―' => '-'
'‐' => '-'
'˗' => '-'
'֊' => '-'
'‐' => '-'
'‑' => '-'
'‒' => '-'
'–' => '-'
'⁃' => '-'
'⁻' => '-'
'₋' => '-'
'−' => '-'
'﹣' => 'ー'
'-' => 'ー'
'—' => 'ー'
'―' => 'ー'
'━' => 'ー'
'─' => 'ー'
CHANGES
0.5.0 (2026-02-08)
Add new func. enlarge_smallkana.
The alphabet2kana func. converts “si” to “し”.
Fix conversion bugs in alphabet2kana and kana2alphabet func.
Fix bugs about small-kana in kana2alphabet func.
Add docstring to alias functions
0.4.1 (2025-11-30)
port static configs to setup.cfg (thanks @eli-schwartz)
migrate testsuite to pytest (thanks @eli-schwartz)
Support Python 3.13 and 3.14
0.4.0 (2024-07-26)
Support Python 3.12
Add stub files according to PEP 561 for mypy (thanks @ernix)
0.3.4 (2023-02-18)
Fix to support Python2.7 ~ 3.4 (thanks @manjuu-eater)
Support Python 3.11
0.3.3 (2022-12-31)
Support Python 3.10
Re-support Python2.7 ~ 3.4 (thanks @manjuu-eater)
Fix z2h, h2z all flag off bug (thanks @manjuu-eater)
0.3.1 (2022-12-14)
Fix alpha2kana infinite loop bug (thanks @frog42)
0.3 (2021-03-29)
Fix bug (alphabet2kana) thanks @Cuddlemuffin007
Support Python 3.8 and 3.9
Add handy functions: alphabet2kata and kata2alphabet. thanks @kokimame
Add function for julius: hiragana2julius
0.2.4 (2018-02-04)
Fix bug (kana2alphabet)
Support Python 3.7
No longer support Python 2.6
Add aliases of z2h -> zenkaku2hankaku and h2z -> hankaku2zenkaku
0.2.3 (2018-02-03)
Fix bugs (alphabet2kana, kana2alphabet) thanks @letuananh
0.2.2 (2018-01-22)
Fix bug (kana2alphabet) thanks @kokimame
Support Python 3.6
0.2.1 (2017-09-14)
Fix bugs (alphabet2kana, kana2alphabet)
0.2 (2015-04-02)
Change module name jctconv -> jaconv
Add alphabet and hiragana interconvert (alphabet2kana, kana2alphabet)
0.1.1 (2015-03-12)
Support Windows
Support Python 3.5
0.1 (2014-11-24)
Add some Japanese characters to convert table (ゝゞ・「」。、)
Decresing memory usage
Some function names are deprecated (hankaku2zenkaku, zenkaku2hankaku, H2K, H2hK, K2H)
0.0.7 (2014-03-22)
z2h and h2z allow mojimoji-like target character type determination. Bug fix about Half Kana conversion.
Metadata
Release files for jaconv 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jaconv-0.5.0.tar.gz | 21.8 kB | Without provenance | Details for jaconv-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jaconv-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for jaconv-0.5.0-py3-none-any.whl |
Total release size: 38.6 kB
Release files / jaconv-0.5.0.tar.gz
| Download URL | jaconv-0.5.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53f6f968276846716f0f37100a6d5c7308cfa1e0c714eb41287d5bb09345c40f
|
|
BLAKE2b-256 checksum How to use checksums |
910e9fffaacda59bdfa479372c71d18d72968d2af5a36a5a2086b02a60124b98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / jaconv-0.5.0-py3-none-any.whl
| Download URL | jaconv-0.5.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2914114fe761ca49fc7089e25e6ad4a400c26f262ffce84e13b176916b71610a
|
|
BLAKE2b-256 checksum How to use checksums |
3bda9657d637bcacdbaf6a914ce504000da5639f9d945f8d3552a940f021d6c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for jaconv 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.