Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 音韻地位.合法性 #5

Open
wants to merge 12 commits into
base: feat-0.5.x
Choose a base branch
from

Conversation

untunt
Copy link
Member

@untunt untunt commented Jul 9, 2021

No description provided.

@untunt
Copy link
Member Author

untunt commented Jul 10, 2021

已跑过《广韵》的所有小韵验证
已跑过 (母, 呼, 等, 重紐, 韻, 聲) 的所有组合简要验证

Copy link
Member

@ayaka14732 ayaka14732 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can simplify by using IntEnum

src/QieyunEncoder/_音位配列規則表.py Outdated Show resolved Hide resolved
src/QieyunEncoder/音韻地位.py Outdated Show resolved Hide resolved
Using IntEnum now

Co-authored-by: Ayaka Mikazuki <[email protected]>
Copy link
Member

@ayaka14732 ayaka14732 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 可以在註釋中解釋一下「無效」、「強非法」、「弱非法」有什麼區別
  2. 可以在註釋中解釋一下為什麼不合法

src/QieyunEncoder/_音位配列規則表.py Outdated Show resolved Hide resolved
src/QieyunEncoder/_音位配列規則表.py Show resolved Hide resolved
commit 64fd85c
Author: Ayaka Mikazuki <[email protected]>
Date:   Sat Jul 10 17:07:19 2021 +0800

    Fix bug

commit e46cb11
Author: Ayaka Mikazuki <[email protected]>
Date:   Sat Jul 10 17:00:06 2021 +0800

    Fix bug

commit 935450d
Author: Ayaka Mikazuki <[email protected]>
Date:   Sat Jul 10 16:57:32 2021 +0800

    Fix bug

commit 8bf6baa
Author: Ayaka Mikazuki <[email protected]>
Date:   Sat Jul 10 16:56:20 2021 +0800

    Support Python 3.10 and drop support of Python 3.6
@ayaka14732
Copy link
Member

最低 Python 版本改成 3.7 了,現在 typing 應該沒問題了

@untunt
Copy link
Member Author

untunt commented Jul 10, 2021

@ayaka14732 注释加上啦

@untunt
Copy link
Member Author

untunt commented Jul 10, 2021

我累死了

src/QieyunEncoder/常量.py Outdated Show resolved Hide resolved
Comment on lines 624 to 632
合法性分爲 6 類,分別是:
- 無效:聲母和韻母的固有性質互相衝突,無法拼合的情況。如:徹母齊韻、昌母山韻
- 強非法:範圍廣(> 50 個音節)且例外少(< 4%)的音系規則所禁止的情況。如:廢韻上聲、銳音四等合口
- 弱非法:範圍小(≤ 50 個音節)或例外多(4% ~ 15%)的音系規則所禁止的情況。如:來母二等、銳音痕韻
- 弱合法:語音學上沒有明確的約束,但範圍內有字率低于 15% 且都是僻字的情況。如:蒸合舒聲、東三上聲
- 稀有合法:語音學上沒有明確的約束,但範圍內有字率低于 15% 而不都是僻字的情況。如:云母鍾韻、知組銜韻
- 強合法:其餘情況。強合法音節的平均有字率約爲 75%

非法音節的空缺是系统空缺(systematic gap),非法音節範圍內的字屬於边缘音节。合法音節的空缺是偶然空缺(accidental gap)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to the documentation of class 合法性

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to export 合法性等級, without actual usage in the API? (as 音韻地位.合法性() only returns its str form)

if not, how do we include it in the docs?

My suggestion: Would it be better if we add a link in the doc of 合法性等級 mentioning 音韻地位.合法性() instead, showing that it is an implementation detail of the public method?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that would be better

src/QieyunEncoder/_音位配列規則表.py Outdated Show resolved Hide resolved
src/QieyunEncoder/_音位配列規則表.py Outdated Show resolved Hide resolved
列表前空一行(否則文檔生成工具 pdoc3 不認識這是列表)

Co-authored-by: Sekai Zhou <[email protected]>
@ayaka14732 ayaka14732 deleted the branch nk2028:feat-0.5.x April 19, 2024 00:12
@ayaka14732 ayaka14732 closed this Apr 19, 2024
@ayaka14732 ayaka14732 reopened this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants