SkillAgentSearch skills...

Pyewts

Tibetan Unicode to Wylie converter. (EWTS-Extended Wylie Transliteration Scheme)

Install / Use

/learn @OpenPecha/Pyewts
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align="center"> <br> <a href="https://openpecha.org"><img src="https://avatars.githubusercontent.com/u/82142807?s=400&u=19e108a15566f3a1449bafb03b8dd706a72aebcd&v=4" alt="OpenPecha" width="150"></a> <br> </h1> <h3 align="center">Python Tibetan Unicode to Wylie (EWTS) Converter</h3> <!-- Replace the title of the repository --> <p align="center"> <a href="#description">Description</a> • <a href="#Installation">Installation</a> • <a href="#Examples">Examples</a> • <a href="#Changes">Changes</a> • <a href="#License">License</a> • <a href="#Maintenance">Maintenance</a> • <a href="#owner">Owner</a> </p> <hr>

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.

<!-- This section provides a high-level overview for the repo -->

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/
python -m build

or with pip:

pip install build
python -m build

Upload on twine (version >= 1.11.0) with:

twine upload dist/*

Owner

<!-- This section lists the owners of the repo -->

Related Skills

View on GitHub
GitHub Stars32
CategoryDevelopment
Updated12h ago
Forks7

Languages

Python

Security Score

95/100

Audited on Apr 5, 2026

No findings