Skip to main content

Utsuho is a Python module that provides interconversion between Japanese half-width katakana and full-width katakana.

Project description

Utsuho

Utsuho is a Python module that provides interconversion between Japanese half-width katakana and full-width katakana.

The name Utsuho comes from the long story "Utsuho Monogatari," which is said to have been written in the middle of the Heian period, and contains descriptions of katakana.

Installing

Install and update using pip:

pip install Utsuho

Usage

To convert from half-width katakana to full-width katakana, code as follows.

from utsuho import HalfToFullConverter

halfwidth = 'キョウトシ サキョウク ギンカクジチョウ 2'
cnv = HalfToFullConverter()
fullwidth = cnv.convert(halfwidth)

The conversion result of the above example is "キョウトシ サキョウク ギンカクジチョウ 2".

To convert from full-width katakana to half-width katakana, code as follows.

from utsuho import FullToHalfConverter

fullwidth = 'キョウトシ サキョウク ギンカクジチョウ 2'
cnv = FullToHalfConverter()
halfwidth = cnv.convert(fullwidth)

The conversion result of the above example is "キョウトシ サキョウク ギンカクジチョウ 2".

License

This project is licensed under the terms of the Apache license 2.0.

See the "LICENSE" file for license rights and limitations.

Links

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

Utsuho-1.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

Utsuho-1.1.1-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

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