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 'မ်း'
Metadata
Release files for myanmartools 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| myanmartools-1.2.1.tar.gz | 30.6 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| myanmartools-1.2.1-py3.8.egg | Legacy Egg format | - | - | Details |
| myanmartools-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.5 kB
Release files / myanmartools-1.2.1.tar.gz
| Download URL | myanmartools-1.2.1.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7328fffc7d2b03d63c3b94966e850c66d881ac6f5a5b8e5dc25da080f20c9e56
|
|
BLAKE2b-256 checksum How to use checksums |
d22501c1341ebb14e269fd1aa3187020df82122bcbac50a3bc17254a2abde28f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6
|
Release files / myanmartools-1.2.1-py3.8.egg
| Download URL | myanmartools-1.2.1-py3.8.egg |
|---|---|
| Size | 32.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
26f1bdb69f4ba744fe15dab14850f5a79b29118422aa67a135e1927557327235
|
|
BLAKE2b-256 checksum How to use checksums |
ed6abbe320a8d77a78cfbaa19615d3ba18cf7d7e561648f443b6c01995eea66f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6
|
Release files / myanmartools-1.2.1-py3-none-any.whl
| Download URL | myanmartools-1.2.1-py3-none-any.whl |
|---|---|
| Size | 28.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49ba5572a6d12fb3e182658eb9709e867393946cb96cbec3fee867cac2aeafa7
|
|
BLAKE2b-256 checksum How to use checksums |
505083821d65844e08738f88ab5c571445830667a953c538197eafebfb212896
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6
|