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.5.0.tar.gz (21.0 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.5.0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for umsc-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1162647508b6bc7b17e8e94ccbff28760a83ae4002102b9ca4db8ddbb006278a
MD5 831609785350d96580ff849950cf0686
BLAKE2b-256 ed42e68962c62421ff8d9728563aaf2a2029303080f3d155b24400e3a0e770ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: umsc-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 33.2 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d3c1b0be5db1ee60ef9b93bb66b3521f5bb7188dc9736f4b10ac1cb9051539e
MD5 401fbb1386e1cd9b0e4dd2cca350b848
BLAKE2b-256 230bd59361344d441441cc9fc377875de3ad7deb82adb8ee02da02a3ff89a942

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