A Python library to convert Japanese texts from Shinjitai to Kyujitai and vice versa
Project description
kyujipy
kyujipy is a Python library to convert Japanese texts from Shinjitai (新字体) to Kyūjitai, (舊字體) and vice versa.
kyujipy is based on the kyujitai.js project, originally authored by Koki Takahashi.
Installation (via Pip)
$ pip install kyujipy
Usage
In Python shell (or inside Python script):
# Import main class
>>> from kyujipy import KyujitaiConverter
# Instantiate Shinjitai <-> Kyujitai converter
>>> converter = KyujitaiConverter()
# Convert a text from Shinjitai to Kyujitai
>>> print(converter.shinjitai_to_kyujitai("新字体"))
新字體
# Convert a text from Kyujitai to Shinjitai
>>> print(converter.kyujitai_to_shinjitai("舊字體"))
旧字体
API Reference
- shinjitai_to_kyujitai(string)
Convert a text from Shinjitai (新字体) to Kyūjitai (舊字體)
- kyujitai_to_shinjitai(string)
Convert a text from Kyūjitai (舊字體) to Shinjitai (新字体)
License
kyujipy is licensed under the MIT license.
© 2017-2023 Emmanuel Ternon
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
kyujipy-0.6.6.tar.gz
(17.8 kB
view details)
Built Distribution
kyujipy-0.6.6-py3-none-any.whl
(20.0 kB
view details)
File details
Details for the file kyujipy-0.6.6.tar.gz
.
File metadata
- Download URL: kyujipy-0.6.6.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.3 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6ef638561e6f509c0d70e8306585379b8e21c4b969442c7a04df808707eb32 |
|
MD5 | 054519f715cec9c361fdfabd3bda14bb |
|
BLAKE2b-256 | d66cc75ec229cc4f0f07fd7cae9f08e4399a0a9912d16fd44020dd68c2d11f61 |
File details
Details for the file kyujipy-0.6.6-py3-none-any.whl
.
File metadata
- Download URL: kyujipy-0.6.6-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.3 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 547d7c24bbd92c64113b0121339660fdacee21614bf4cc39afdb1bda582e09b4 |
|
MD5 | af52e56ab597953499e0a92eb6583717 |
|
BLAKE2b-256 | 6b4fc0b3371e241a8f6ed972a8a777f70452e687a7d5764c568944169b5eec94 |