Skip to content

Commit

Permalink
改進 putonghua.js 推導
Browse files Browse the repository at this point in the history
* 加入 #55 之作者
* 修正通攝入聲字韻母推導
* 於未開啟「更多選項」時,不推導陰入聲調
* 修正選項標點符號
  • Loading branch information
graphemecluster committed Apr 22, 2024
1 parent b5a986a commit a535894
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions putonghua.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* 推導普通話
*
* @author graphemecluster
* @author JwietPuj-Drin
*
* 選項「清聲母入聲調分派層次」詳見平山久雄《中古汉语的清入声在北京话里的对应规律》
* http://ccj.pku.edu.cn/Article/DownLoad?id=271015083&&type=ArticleFile
Expand Down Expand Up @@ -31,7 +32,7 @@ if (!音韻地位) return [
'皆派入陰平',
'次清、擦音和零聲母字派入去聲,其餘派入陽平',
'次清和零聲母字派入去聲,其餘派入陽平',
'連同濁聲母所有入聲字皆派入去聲'
'連同濁聲母所有入聲字皆派入去聲'
]
],
['常母平聲陰聲韻聲母和船母平聲聲母', [2, 'ch', 'sh']],
Expand Down Expand Up @@ -160,7 +161,7 @@ const 舒聲韻母規則 = () => when([

const 入聲韻母規則 = () => when([
// 通攝
['通攝', 'u'],
['通攝', [['三等 牙喉音', 'ü'], ['', 'u']]],

// 江攝
['江韻', [['牙喉音', 'üe'], ['', 'uo']]],
Expand Down Expand Up @@ -204,7 +205,7 @@ const 聲調規則 = () => when([
['平聲', '1'],
['上聲', '3'],
['去聲', '4'],
['入聲', '1'],
['入聲', ''],
]],
['濁音', [
['平聲', '2'],
Expand Down Expand Up @@ -243,7 +244,7 @@ if (選項.更多選項) {
if (is`影母 或 次清`) 聲調 = '4';
else if (is`全清`) 聲調 = '2';
break;
case '連同濁聲母所有入聲字皆派入去聲':
case '連同濁聲母所有入聲字皆派入去聲':
聲調 = '4';
break;
}
Expand Down

0 comments on commit a535894

Please sign in to comment.