Skip to main content

Script Converter for Uyghur Language

Project description

Script Converter for Uyghur Language

This converter supports multiple Uyghur writing systems:

  • ULS — Uyghur Latin Script
  • UAS — Uyghur Arabic Script
  • CTS — Common Turkish Script
  • UCS — Uyghur Cyrillic Script
  • UYS — Uyghur Yengi (New) Script
  • IPA — International Phonetic Alphabet
  • UZLS — Uzbek Latin Script
  • XJUS — Xinjiang University Script

Installation

pip install umsc

Mapping table

UAS CTS ULS UCS UYS IPA UZLS XJUS
ا a a а a /ɑ/ o a
ە e e ә ə /æ/ a A
ب b b б b /b/ b b
پ p p п p /p/ p p
ت t t т t /t/ t t
ج c j җ j /d͡ʒ/ j j
چ ç ch ч q /t͡ʃ/ ch c
خ x x х h /χ/ x H
د d d д d /d/ d d
ر r r р r /r/ r r
ز z z з z /z/ z z
ژ j zh ж /ʒ/ j J
س s s с s /s/ s s
ش ş sh ш x /ʃ/ sh x
ف f f ф f /f/ f f
ڭ ñ ng ң ng /ŋ/ ng N
ل l l л l /l/ l l
م m m м m /m/ m m
ھ h h һ /h/ h h
و o o о o /o/ o
ۇ u u у u /u/ u u
ۆ ö ö ө ɵ /ø/ O
ۈ ü ü ү ü /y/ U
ۋ v w в w /w/ v w
ې é é е e /ɛ/ e e
ى i i и i /i/ i i
ي y y й y /j/ y y
ق q q қ /q/ q q
ك k k к k /k/ k k
گ g g г g /ɡ/ g g
ن n n н n /n/ n n
غ ğ gh ғ ƣ /ʁ/ G
ئ v
يا ya ya я ya ya ya
يۇ yu yu ю yu yu yu

Sample input and output examples

Review the files in the tests directory for examples of converting between different scripts.

Usage

from umsc import UgMultiScriptConverter
# To convert text, you need to define source and target scripts
# The abbreviation of scrips
# ULS | Uyghur Latin Script
# UYS | Uyghur Yengi (New) Script
# CPS | Chinese Pinyin Script
# UAS | Uyghur Arabic Script
# CTS |Common Turkic Script
# UCS | Uyghur Cyrillic Script
# XJU | Xinjinag University English Case Sensitive
# UZLS | Uzbek Latin Script
# Convert Uyghur Arabic Script to Uyghur Latin Script
source_script = 'UAS'
target_script = 'ULS'
converter = UgMultiScriptConverter(source_script, target_script)
text1 = 'ياخشىمۇسىز!'
text1 = converter(text1)
print(text1)
# Convert Uyghur Latin Script to Uyghur Arabic Script
source_script = 'ULS'
target_script = 'UAS'
converter = UgMultiScriptConverter(source_script, target_script)
text2 = 'yaxshimusiz!'
text2 = converter(text2)
print(text2)

Notes

  • API and Uzbek are currently developing. The mapping might not be very accurate. Especially for Uzbek, it is not very clear how to map "ئا" and "ئە" to Uzbek.

Citation

If you wish to cite this project, please use cite this repository.

Contributing

Feel free to raise issue and pull request.

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

umsc-0.4.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

umsc-0.4.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file umsc-0.4.0.tar.gz.

File metadata

  • Download URL: umsc-0.4.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for umsc-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3f7ec701d8897569cee95f775e29ac97fd5fec9caf9555bda32686eaa1ccf6b9
MD5 d0b78342c8425385de710ba4da385ec7
BLAKE2b-256 c0461b7de1dd1698505730b727a1b8d67fcc7daf841101edd171b3f816ab434f

See more details on using hashes here.

File details

Details for the file umsc-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: umsc-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for umsc-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 558d1ac9aea3e17466c8f28c90019fa53ec0af9b56e6f0104ecdadc4f8147bef
MD5 42090f4ff0688c061933ea5b6667fd29
BLAKE2b-256 e2fa23769066813103fc1b9b2c8df7cb0a858dd313b331b4996ceb34663343c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page