维吾尔文处理
动机
本人因课题需要,需要对维吾尔文进行自然语言处理,但维文的文本是自右向左排版的,在很多时候不利手动处理(如选中复制,虽然应避免手动处理,但仍有场景),而且与其他自左向右的文字混在一起时会出现一些问题(例如显示在在右侧的数字其实一个在句首一个在句末),且很多字母在词首词中词尾和单列时是不一样的,所以有些没有连字字体的系统需要单独定义字符。为了方便我这个小辣鸡我需要一个小工具转换老维文为拉丁维文。
术语
UEY : 老维文,中国新疆官方唯一官方字母表,在公共媒体和日常生活中使用;
UKY : 西里尔维文,在中亚尤其是哈萨克斯坦使用;
ULY : 维吾尔语拉丁字母是在2008年推出的,只在计算机相关领域作为辅助书写系统使用,但在所有设备上扩大使用UEY键盘后,现在基本上已经废弃了。
UYY : 新维字(也叫拼音Yeziⱪi或UPNY),这种字母也是基于拉丁文的,但现在大多数想用拉丁文打字的人都用ULY代替。
安装
$ pip install uyghur
用法
from uyghur.conversion import uey2uly
print(uey2uly('پلام، جهان'))
测试
在 CPython 3.8/3.9/3.10 和 Pypy 3.8 测试,如需自行运行测试,执行下列命令
tox
待办
- UEY2ULY
- ULY2UEY
- UEY2UKY
- UKY2UEY
- UEY2UYY
- UYY2UEY
- TEXT2SPEECH
参考文献
- DB65/T 3690-2015 现行维吾尔文与拉丁维吾尔文编码字符转换规则
Metadata
Release files for uyghur 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uyghur-0.1.2.tar.gz | 4.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uyghur-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / uyghur-0.1.2.tar.gz
| Download URL | uyghur-0.1.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f640ff1c405cd065fee08430e826c8fb4e35e6d633f6fd3921716e58a4ee4331
|
|
BLAKE2b-256 checksum How to use checksums |
6f0244e22ed92f8436dfd1b01d5879f7784e63071b1e906accd401deb0b5331f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / uyghur-0.1.2-py3-none-any.whl
| Download URL | uyghur-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
260910a9cfb3340dd083e0509510e78a4226fc8565b6f10b47d25a32c0723b13
|
|
BLAKE2b-256 checksum How to use checksums |
fa352785bc8184be8b1ee1b4deac83b1bd9285cb33aa4b28341c594750b2bdb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Security for uyghur 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.