Skip to main content

A Python library to convert Japanese texts from Shinjitai to Kyujitai and vice versa

Project description

kyujipy

PyPI version

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-2025 Emmanuel Ternon

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

kyujipy-0.6.8.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

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

kyujipy-0.6.8-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file kyujipy-0.6.8.tar.gz.

File metadata

  • Download URL: kyujipy-0.6.8.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.3

File hashes

Hashes for kyujipy-0.6.8.tar.gz
Algorithm Hash digest
SHA256 ec0b57db14a5c3a0a0bc83779b4864f42a569b03a57d9ae38fbf6face6de587a
MD5 c83b01787a900153b8893695fa33c17c
BLAKE2b-256 d8e609a59448b4f632989dbe4d5fa7eeb6d1e4413a1efd8ccceeaa9e3a339f48

See more details on using hashes here.

File details

Details for the file kyujipy-0.6.8-py3-none-any.whl.

File metadata

  • Download URL: kyujipy-0.6.8-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.3

File hashes

Hashes for kyujipy-0.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 29a65d7dbecda9a8842d141eb05090025a28f2677b51b3845fc21e579db1b6e2
MD5 eb36f25cd039a9784b3edf2406f215bd
BLAKE2b-256 83a6c8f3cee03b9be95292f332ac7c0b571f50ad3f67a3f5f00fac0e43f4f90b

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