Python Tibetan Unicode to Wylie (EWTS) Converter
Description • Installation • Examples • Changes • License • Maintenance • Owner
Description
The goal of this code is to provide a library to convert back and forth between Tibetan Unicode and EWTS. The code is adapted from Java ewts-converter.
It also provides a conversion from the ACIP Transliteration to EWTS.
Installation
pip install pyewts
Examples
Convert Wylie to Unicode
import pyewts
converter = pyewts.pyewts()
print(converter.toUnicode("ba b+ba [a] ba\\u0f0b"))
# བ་བྦ་a་བ་
Convert Unicode to Wylie
print(converter.toWylie("༼༽"))
# ()
Catch Wylie warnings
>>> orig = """dangs
... zhwa
... dwang
... rma
... tshe
... phywa
... dge
... rgya
... dwags
... (rtse mgron)"""
>>>
>>> print(orig)
dangs
zhwa
dwang
rma
tshe
phywa
dge
rgya
dwags
(rtse mgron)
>>> warns = []
>>> res = converter.toUnicode(orig, warns)
>>> print(res)
དངས
ཞྭ
དྭང
རྨ
ཚེ
ཕྱྭ
དགེ
རྒྱ
དྭགས
༼རྩེ་མགྲོན༽
>>> print(warns)
['line 1: "dangs": Syllable should probably be "dngas".']
See demo.py
Changes
See CHANGELOG.md.
License
The Python code is Copyright (C) 2018 Esukhia, provided under MIT License. See CONTRIBUTORS.md for a list of authors and contributors.
Maintenance
Build the source dist:
rm -rf dist/
python3 setup.py clean sdist
and upload on twine (version >= 1.11.0) with:
twine upload dist/*
Owner
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyewts-0.2.0.tar.gz.
File metadata
- Download URL: pyewts-0.2.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.28.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fb7b4e1abcb7b98d57d48d2fbc0ad0acc45d3d86341c059d1884ca26c924ee0
|
|
| MD5 |
b4cc82d42a1ce1baf081a499b6caa53c
|
|
| BLAKE2b-256 |
f9bb51707e7f19b78b55b59eed66c5fa83b89786c30b346dea71dfecffb122a5
|