Skip to content

Commit

Permalink
src: update source from qieyun-rime-table
Browse files Browse the repository at this point in the history
No changes introduced to the built data (廣韻.csv).
  • Loading branch information
syimyuzya committed Jul 21, 2024
1 parent 78dfb5c commit 87038af
Show file tree
Hide file tree
Showing 3 changed files with 728 additions and 739 deletions.
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Sources

- 廣韻(20170209).csv: From [廣韻字音表](https://zhuanlan.zhihu.com/p/20430939), created by poem.
- rime-table-bfa9b50.tsv: From [切韻新韻圖](https://phesoca.com/rime-table/) by unt, built from git commit `bfa9b50`.
- rime-table-0b69606.tsv: From [切韻新韻圖](https://phesoca.com/rime-table/) by unt, built from git commit `0b69606`.
- split.csv: Maintained here, ultimately also from 切韻新韻圖.

## Build
Expand Down
13 changes: 1 addition & 12 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ def process_音韻地位(row: list[str]) -> str:
return ''
if (pos := .find('→')) != -1:
= [pos + 1 :]
if 等類 == '四(?)':
等類 = '四' if in ('脂', '麻') else '二'
等類 = 等類.replace('(', '')
等類 = 等類.replace(')', '')
if in 幫見影組 and 等類 == '三':
if == '麻' or ( == '幽' and not in 幫組):
等類 += 'A'
elif == '幽' or ( == '蒸' and ( == '合' or in 幫組)):
等類 += 'B'
else:
等類 += 'C'
# NOTE 原資料莊組真殷韻依原貌。由於資料中已列「韻目原貌」,故地位不需再分
if in ('真', '殷') and == '開' and in tuple('莊初崇生俟'):
= '臻'
Expand All @@ -39,7 +28,7 @@ def fix_pua(s: str) -> str:

def main():
小韻_data: dict[str, list[str]] = {}
with open('src/rime-table-bfa9b50.tsv') as fin:
with open('src/rime-table-0b69606.tsv') as fin:
next(fin)
for line in fin:
row = line.rstrip('\n').split('\t')
Expand Down
Loading

0 comments on commit 87038af

Please sign in to comment.