Pyewts
Tibetan Unicode to Wylie converter. (EWTS-Extended Wylie Transliteration Scheme)
Install / Use
/learn @OpenPecha/PyewtsREADME
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
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
