Python Tibetan Unicode to Wylie (EWTS) Converter
Description • Installation • Examples • 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
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/
python -m build
or with pip:
pip install build
python -m build
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyewts-1.0.0.tar.gz.
File metadata
- Download URL: pyewts-1.0.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d96516abb063ba5fac87d6b2e6457ad7f8e90ea740cfbc3b07055864d29527cb
|
|
| MD5 |
b27e8a92036da41283e4adcc4889be89
|
|
| BLAKE2b-256 |
7880a09f26789b27eb905ec37b8cc361e26f32550e933b86f13f33e43f3470ef
|
File details
Details for the file pyewts-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyewts-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73b52e4469dbb47bcbabe422bb2dbec88f657bb44a0017b9ba3166bb50c076e5
|
|
| MD5 |
0efdf26a628a0997b5e99700bdb85c8c
|
|
| BLAKE2b-256 |
c4ec17ab2aa3919563cde601c721e5258eb972d6be1bff5deaeaa9d33925e554
|