Skip to main content


OpenPecha

Python Tibetan Unicode to Wylie (EWTS) Converter

DescriptionInstallationExamplesLicenseMaintenanceOwner


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

pyewts-1.0.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyewts-1.0.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

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

Hashes for pyewts-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d96516abb063ba5fac87d6b2e6457ad7f8e90ea740cfbc3b07055864d29527cb
MD5 b27e8a92036da41283e4adcc4889be89
BLAKE2b-256 7880a09f26789b27eb905ec37b8cc361e26f32550e933b86f13f33e43f3470ef

See more details on using hashes here.

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

Hashes for pyewts-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73b52e4469dbb47bcbabe422bb2dbec88f657bb44a0017b9ba3166bb50c076e5
MD5 0efdf26a628a0997b5e99700bdb85c8c
BLAKE2b-256 c4ec17ab2aa3919563cde601c721e5258eb972d6be1bff5deaeaa9d33925e554

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.2.0

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page