# ToMiddleChinese [![Release Python Package](https://github.com/nk2028/ToMiddleChinese/actions/workflows/python-publish.yml/badge.svg)](https://github.com/nk2028/ToMiddleChinese/actions/workflows/python-publish.yml)
### Install
```sh
$ pip install ToMiddleChinese
```
### Usage
```python
>>> import ToMiddleChinese
>>> # 音韻地位 (Description of Phonological Position)
>>> ToMiddleChinese.get_pos_list('遙襟甫暢,逸興遄飛。')
[('遙', '以開三宵平'), ('襟', '見開三B侵平'), ('甫', '幫三虞上'), ('暢', '徹開三陽去'), (',', None), ('逸', '以開三眞入'), ('興', '曉開三蒸平'), ('遄', '常合三仙平'), ('飛', '幫三微平'), ('。', None)]
>>> ToMiddleChinese.get_pos('遙襟甫暢,逸興遄飛。')
'遙(以開三宵平)襟(見開三B侵平)甫(幫三虞上)暢(徹開三陽去),逸(以開三眞入)興(曉開三蒸平)遄(常合三仙平)飛(幫三微平)。'
>>> ToMiddleChinese.get_pos_text('遙襟甫暢,逸興遄飛。')
'以開三宵平 見開三B侵平 幫三虞上 徹開三陽去,以開三眞入 曉開三蒸平 常合三仙平 幫三微平。'
>>> # 切韻拼音 (Tshet-uinh Phonetic Alphabet)
>>> ToMiddleChinese.get_tupa_list('遙襟甫暢,逸興遄飛。')
[('遙', 'jiew'), ('襟', 'kyim'), ('甫', 'puoq'), ('暢', 'trhyangh'), (',', None), ('逸', 'jit'), ('興', 'hyngh'), ('遄', 'djwien'), ('飛', 'puj'), ('。', None)]
>>> ToMiddleChinese.get_tupa('遙襟甫暢,逸興遄飛。')
'遙(jiew)襟(kyim)甫(puoq)暢(trhyangh),逸(jit)興(hyngh)遄(djwien)飛(puj)。'
>>> ToMiddleChinese.get_tupa_text('遙襟甫暢,逸興遄飛。')
'jiew kyim puoq trhyangh, jit hyngh djwien puj.'
>>> # 古韻羅馬字 (Koxyonh’s Romanization)
>>> ToMiddleChinese.get_kyonh_list('遙襟甫暢,逸興遄飛。')
[('遙', 'jeu'), ('襟', 'kim'), ('甫', 'pyox'), ('暢', 'thriangh'), (',', None), ('逸', 'jit'), ('興', 'hingh'), ('遄', 'zjyen'), ('飛', 'pyoi'), ('。', None)]
>>> ToMiddleChinese.get_kyonh('遙襟甫暢,逸興遄飛。')
'遙(jeu)襟(kim)甫(pyox)暢(thriangh),逸(jit)興(hingh)遄(zjyen)飛(pyoi)。'
>>> ToMiddleChinese.get_kyonh_text('遙襟甫暢,逸興遄飛。')
'jeu kim pyox thriangh, jit hingh zjyen pyoi.'
>>> # unt 切韻擬音 (unt’s Qieyun Reconstruction)
>>> ToMiddleChinese.get_unt_list('遙襟甫暢,逸興遄飛。')
[('遙', 'jew'), ('襟', 'kɹim'), ('甫', 'púo'), ('暢', 'ʈʰàɴ'), (',', None), ('逸', 'jit'), ('興', 'xɨ̀ŋ'), ('遄', 'dʑwen'), ('飛', 'puj'), ('。', None)]
>>> ToMiddleChinese.get_unt('遙襟甫暢,逸興遄飛。')
'遙[jew]襟[kɹim]甫[púo]暢[ʈʰàɴ],逸[jit]興[xɨ̀ŋ]遄[dʑwen]飛[puj]。'
>>> ToMiddleChinese.get_unt_text('遙襟甫暢,逸興遄飛。')
'jew.kɹim.púo.ʈʰàɴ | jit.xɨ̀ŋ.dʑwen.puj'
```
Raw data
{
"_id": null,
"home_page": "https://github.com/nk2028/ToMiddleChinese",
"name": "ToMiddleChinese",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5, <4",
"maintainer_email": "",
"keywords": "chinese middle-chinese linguistics nlp natural-language-processing",
"author": "Ngiox Khyen 2028 Project",
"author_email": "support@mail.nk2028.shn.hk",
"download_url": "https://files.pythonhosted.org/packages/99/99/0bfc2c2c74d043fb4526a9a302d6dfc88fba226cc48bf176b618ba5f85ab/ToMiddleChinese-0.2.2.tar.gz",
"platform": null,
"description": "# ToMiddleChinese [![Release Python Package](https://github.com/nk2028/ToMiddleChinese/actions/workflows/python-publish.yml/badge.svg)](https://github.com/nk2028/ToMiddleChinese/actions/workflows/python-publish.yml)\n\n### Install\n\n```sh\n$ pip install ToMiddleChinese\n```\n\n### Usage\n\n```python\n>>> import ToMiddleChinese\n\n>>> # \u97f3\u97fb\u5730\u4f4d (Description of Phonological Position)\n>>> ToMiddleChinese.get_pos_list('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n[('\u9059', '\u4ee5\u958b\u4e09\u5bb5\u5e73'), ('\u895f', '\u898b\u958b\u4e09B\u4fb5\u5e73'), ('\u752b', '\u5e6b\u4e09\u865e\u4e0a'), ('\u66a2', '\u5fb9\u958b\u4e09\u967d\u53bb'), ('\uff0c', None), ('\u9038', '\u4ee5\u958b\u4e09\u771e\u5165'), ('\u8208', '\u66c9\u958b\u4e09\u84b8\u5e73'), ('\u9044', '\u5e38\u5408\u4e09\u4ed9\u5e73'), ('\u98db', '\u5e6b\u4e09\u5fae\u5e73'), ('\u3002', None)]\n>>> ToMiddleChinese.get_pos('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'\u9059\uff08\u4ee5\u958b\u4e09\u5bb5\u5e73\uff09\u895f\uff08\u898b\u958b\u4e09B\u4fb5\u5e73\uff09\u752b\uff08\u5e6b\u4e09\u865e\u4e0a\uff09\u66a2\uff08\u5fb9\u958b\u4e09\u967d\u53bb\uff09\uff0c\u9038\uff08\u4ee5\u958b\u4e09\u771e\u5165\uff09\u8208\uff08\u66c9\u958b\u4e09\u84b8\u5e73\uff09\u9044\uff08\u5e38\u5408\u4e09\u4ed9\u5e73\uff09\u98db\uff08\u5e6b\u4e09\u5fae\u5e73\uff09\u3002'\n>>> ToMiddleChinese.get_pos_text('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'\u4ee5\u958b\u4e09\u5bb5\u5e73\u3000\u898b\u958b\u4e09B\u4fb5\u5e73\u3000\u5e6b\u4e09\u865e\u4e0a\u3000\u5fb9\u958b\u4e09\u967d\u53bb\uff0c\u4ee5\u958b\u4e09\u771e\u5165\u3000\u66c9\u958b\u4e09\u84b8\u5e73\u3000\u5e38\u5408\u4e09\u4ed9\u5e73\u3000\u5e6b\u4e09\u5fae\u5e73\u3002'\n\n>>> # \u5207\u97fb\u62fc\u97f3 (Tshet-uinh Phonetic Alphabet)\n>>> ToMiddleChinese.get_tupa_list('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n[('\u9059', 'jiew'), ('\u895f', 'kyim'), ('\u752b', 'puoq'), ('\u66a2', 'trhyangh'), ('\uff0c', None), ('\u9038', 'jit'), ('\u8208', 'hyngh'), ('\u9044', 'djwien'), ('\u98db', 'puj'), ('\u3002', None)]\n>>> ToMiddleChinese.get_tupa('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'\u9059(jiew)\u895f(kyim)\u752b(puoq)\u66a2(trhyangh)\uff0c\u9038(jit)\u8208(hyngh)\u9044(djwien)\u98db(puj)\u3002'\n>>> ToMiddleChinese.get_tupa_text('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'jiew kyim puoq trhyangh, jit hyngh djwien puj.'\n\n>>> # \u53e4\u97fb\u7f85\u99ac\u5b57 (Koxyonh\u2019s Romanization)\n>>> ToMiddleChinese.get_kyonh_list('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n[('\u9059', 'jeu'), ('\u895f', 'kim'), ('\u752b', 'pyox'), ('\u66a2', 'thriangh'), ('\uff0c', None), ('\u9038', 'jit'), ('\u8208', 'hingh'), ('\u9044', 'zjyen'), ('\u98db', 'pyoi'), ('\u3002', None)]\n>>> ToMiddleChinese.get_kyonh('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'\u9059(jeu)\u895f(kim)\u752b(pyox)\u66a2(thriangh)\uff0c\u9038(jit)\u8208(hingh)\u9044(zjyen)\u98db(pyoi)\u3002'\n>>> ToMiddleChinese.get_kyonh_text('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'jeu kim pyox thriangh, jit hingh zjyen pyoi.'\n\n>>> # unt \u5207\u97fb\u64ec\u97f3 (unt\u2019s Qieyun Reconstruction)\n>>> ToMiddleChinese.get_unt_list('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n[('\u9059', 'jew'), ('\u895f', 'k\u0279im'), ('\u752b', 'pu\u0301o'), ('\u66a2', '\u0288\u02b0a\u0300\u0274'), ('\uff0c', None), ('\u9038', 'jit'), ('\u8208', 'x\u0268\u0300\u014b'), ('\u9044', 'd\u0291wen'), ('\u98db', 'puj'), ('\u3002', None)]\n>>> ToMiddleChinese.get_unt('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'\u9059[jew]\u895f[k\u0279im]\u752b[pu\u0301o]\u66a2[\u0288\u02b0a\u0300\u0274]\uff0c\u9038[jit]\u8208[x\u0268\u0300\u014b]\u9044[d\u0291wen]\u98db[puj]\u3002'\n>>> ToMiddleChinese.get_unt_text('\u9059\u895f\u752b\u66a2\uff0c\u9038\u8208\u9044\u98db\u3002')\n'jew.k\u0279im.pu\u0301o.\u0288\u02b0a\u0300\u0274 | jit.x\u0268\u0300\u014b.d\u0291wen.puj'\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "\u4e2d\u53e4\u6f22\u8a9e\u81ea\u52d5\u6a19\u8a3b\u5de5\u5177 Middle Chinese Pronunciation Automatic Labeling Tool",
"version": "0.2.2",
"split_keywords": [
"chinese",
"middle-chinese",
"linguistics",
"nlp",
"natural-language-processing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "168084f6e1513ed2e4a66ec8349bcea7071a40c1cbd39f2247d6c6c6ec6fd335",
"md5": "17189c49e62f51730351dc68dd17149b",
"sha256": "e8ec0d48bec908e261b4f3ff5ea5c57d9223fde027252233476da0519c1323f8"
},
"downloads": -1,
"filename": "ToMiddleChinese-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "17189c49e62f51730351dc68dd17149b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5, <4",
"size": 5202900,
"upload_time": "2023-03-13T11:53:33",
"upload_time_iso_8601": "2023-03-13T11:53:33.306344Z",
"url": "https://files.pythonhosted.org/packages/16/80/84f6e1513ed2e4a66ec8349bcea7071a40c1cbd39f2247d6c6c6ec6fd335/ToMiddleChinese-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "99990bfc2c2c74d043fb4526a9a302d6dfc88fba226cc48bf176b618ba5f85ab",
"md5": "5def13bfb3000851d8532116b0835f87",
"sha256": "359e013f093dfaeb82545a49ca2ce9e55cc3ca071f03088366b40294d01ca15b"
},
"downloads": -1,
"filename": "ToMiddleChinese-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "5def13bfb3000851d8532116b0835f87",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5, <4",
"size": 5200736,
"upload_time": "2023-03-13T11:53:34",
"upload_time_iso_8601": "2023-03-13T11:53:34.884637Z",
"url": "https://files.pythonhosted.org/packages/99/99/0bfc2c2c74d043fb4526a9a302d6dfc88fba226cc48bf176b618ba5f85ab/ToMiddleChinese-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-13 11:53:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "nk2028",
"github_project": "ToMiddleChinese",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tomiddlechinese"
}