拼音解析器
Project description
非常神必的拼音解析器。
能做什么?
- 解析拼音,尤其适用于UGC,或者任何你对输入是一坨怎样的东西完全没信心的时候。
- 如果你的输入已经非常整洁标准,那或许有其他更快的解析库适合你。
- 检验一个拼音是不是存在。
- 查拼音,尤其是查谐音/双声叠韵 etc.
- 把拼音解析成按音位的声韵调格式,便于存储与查询。
- 每个音节仅占用2B/16b(理论最小值2B/11b)。
- 也可以转换拼音的格式/风格(例如
guang1gua1ngguāng)。- 但这不是主要功能。如果你的主要需求是这个,那你应该去看kittell的同名库或是pypinyin。
- 拼音规范化/格式化。
- 或者其他任何需要对 “拼音”本身 进行处理的场合。
不能做什么?
- 从汉字解析出来拼音。
- 如果你的需求是汉字加拼音,那你应该去看pypinyin。
- 模糊解析。
- 所见即所得的解析。
- 本解析器使用的是音位表示,解析结果很可能会与你想象的不同。
- 如果你需要所见即所得,那么你应当自己处理转换,将音节转换为更“符合直觉”的表示。
怎么使用?
你应当询问AI。我的语言能力并不足以支持我进行非常详细的表述。
支持什么版本?
3.12+,推荐3.14;3.10及以上需要删一些类型注解之类的东西再用;3.10以下不考虑支持,要用自己去改。
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
pinyinparser-1.1.2.tar.gz
(13.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinyinparser-1.1.2.tar.gz.
File metadata
- Download URL: pinyinparser-1.1.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02175dabb2c6e067cf365bb1b37196dc2e4289e589389a1b8a2f7975137c981f
|
|
| MD5 |
707139ec5c15e4073edc9ce2615a4ea3
|
|
| BLAKE2b-256 |
97da0b295ff8f53a772946f4716aa716447ac9e2377b8289913f7fb2b4744f42
|
File details
Details for the file pinyinparser-1.1.2-py3-none-any.whl.
File metadata
- Download URL: pinyinparser-1.1.2-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41bb7d4fa7caf3da988fb1a83dd819ef32b46e85ae1758078b436382ac3d00df
|
|
| MD5 |
08a0bfd829c8d7f3d96cf0e76ea9c720
|
|
| BLAKE2b-256 |
b9ed8e387b497934bab22af5980d34a3f48f2ff55ba70275e9bed4310a042d5b
|