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

1. Install via Pip:

$ pip install kyujipy

2. Install from Git:

$ git clone https://github.com/DrTurnon/kyujipy.git
$ python setup.py install

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

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
kyujipy-0.4.1-py3-none-any.whl (25.1 kB) Copy SHA256 hash SHA256 Wheel py3 Sep 19, 2018
kyujipy-0.4.1.tar.gz (15.4 kB) Copy SHA256 hash SHA256 Source None Sep 19, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page