Tools for processing font encodings used in Myanmar
Project description
This documentation is python specific usage of Myanmar Tools. For general documentation, see the top-level README.
Installation
From PyPI
$ pip install myanmartools
From GitHub
$ pip install 'git+https://github.com/google/myanmar-tools@master#egg=myanmartools&subdirectory=clients/python'
Usage Examples
To detect Zawgyi, create an instance of ZawgyiDetector, and call get_zawgyi_probability with a string:
from myanmartools import ZawgyiDetector detector = ZawgyiDetector() score = detector.get_zawgyi_probability('မ္း') # score is now 0.999772 (very likely Zawgyi)
For Zawgyi-to-Unicode conversion, you can use the ICU library. Install it using pip install PyICU.
To convert Zawgyi to Unicode, create an instance of ICU Transliterator with the transform ID “Zawgyi-my”, and call transiliterate with a string:
from icu import Transliterator converter = Transliterator.createInstance('Zawgyi-my') output = converter.transliterate('မ္း') # output is now 'မ်း'
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
Built Distribution
Hashes for myanmartools-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de05fe3ca1a51e0d30ea493ef73f34fb92bba82eb8abceaa0f25b06a1eec6cc |
|
MD5 | 62eada4a09685bcdd86a18ff94f0e374 |
|
BLAKE2b-256 | 9e72a8684bc806245f3d3207aad8b59d863c7b86c5de49a5619a7f603353deef |