Skip to content

Commit

Permalink
putonghua.js adds derivation of voiceless checked tones 清音入聲, fine-…
Browse files Browse the repository at this point in the history
…tunes derivation of chong 崇母, chang 常母, and chuan initials 船母 | `putonghua.js` 补充清音入聲的推導,微調崇常船三母的推導 (#55)

* `putonghua.js` adds derivation of voiceless checked tones 清音入聲, fine-tunes derivation of chong 崇母, chang 常母, and chuan initials 船母 | `putonghua.js` 补充清音入聲的推導,微調崇常船三母的推導

1. The current version of `putonghua.js` leaves blank the derivation results of voiceless checked tones 清音入聲. But according to the *Scheme for the Chinese Phonetic Alphabet* 漢語拼音方案, no tone mark is regarded as neutral tone 輕聲, which obviously does not conform to the linguistic reality. Try to supplement it as yinping (level tone) 陰平 according to [Liu Haiyang's answer](https://www.zhihu.com/question/30370012/answer/533234460 "北京话的入声为什么会派入三个不同的声调? - 刘海阳的回答 - 知乎") , and imitate `unt.js` to write extension options.

2. According to [unt's answer](https://www.zhihu.com/question/526195183/answer/2425807330 "为何中古的dʑ ʑ和普通话读音的对应似乎是反的(即dʑ > ʂ、ʑ > ʈʂ)? - UntPhesoca的回答 - 知乎"), the derivation of chong 崇母, chang 常母, and chuan initials 船母 still has room for improvement. Try to modify the default derivation and write extension options.

---

1. 現版本的 `putonghua.js` 對清音入聲的推導結果作留空處理。但根據《漢語拼音方案》,不標調視為輕聲調,這顯然不符合語言現實。試根據 [刘海阳的回答](https://www.zhihu.com/question/30370012/answer/533234460 "北京话的入声为什么会派入三个不同的声调? - 刘海阳的回答 - 知乎") 補為陰平,並模仿 `unt.js` 編寫擴展選項。

2. 據 [unt 的回答](https://www.zhihu.com/question/526195183/answer/2425807330 "为何中古的dʑ ʑ和普通话读音的对应似乎是反的(即dʑ > ʂ、ʑ > ʈʂ)? - UntPhesoca的回答 - 知乎") ,崇常船三母的推導還有提升空間。試修改默認推導並編寫擴展選項。

* Correction suggested by @graphemecluster | 根據 @graphemecluster 的建議修正

* Suggested fixes based on @graphemecluster | 根據 @graphemecluster 的建議修正

Co-authored-by: 形素叢集・ぐらふぃーむ <[email protected]>

---------

Co-authored-by: 形素叢集・ぐらふぃーむ <[email protected]>
  • Loading branch information
Jwiet-Puj Drin | 姚妫颍 and graphemecluster authored Mar 8, 2024
1 parent 7001c85 commit b5a986a
Showing 1 changed file with 62 additions and 3 deletions.
65 changes: 62 additions & 3 deletions putonghua.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@
/* 推導普通話
*
* @author graphemecluster
*
* 選項「清聲母入聲調分派層次」詳見平山久雄《中古汉语的清入声在北京话里的对应规律》
* http://ccj.pku.edu.cn/Article/DownLoad?id=271015083&&type=ArticleFile
* 默認選擇為「皆派入陰平」,参考刘海阳在對「北京话的入声为什么会派入三个不同的声调?」的回答中披露的材料——
* 「古代清音入声字在北京話的声調,凡是沒有异讀的,就采用北京已經通行的讀法。凡是有异讀的,假若其中有一个是陰平調,原則上就采用陰平,例如:“息”ㄒㄧ(xī)“击”ㄐㄧ(jī)。否則逐字考慮,采用比較通行……」
* https://www.zhihu.com/question/30370012/answer/533234460
*
* 選項「常母平聲陰聲韻聲母和船母平聲聲母」詳見 unt 對「为何中古的dʑ ʑ和普通话读音的对应似乎是反的(即dʑ > ʂ、ʑ > ʈʂ)?」的回答
* https://www.zhihu.com/question/526195183/answer/2425807330
*/

/** @type { 音韻地位['屬於'] } */
const is = (...x) => 音韻地位.屬於(...x);
/** @type { 音韻地位['判斷'] } */
const when = (...x) => 音韻地位.判斷(...x);

const is更多選項 = 選項.更多選項 ?? false;

if (!音韻地位) return [
['標調方式', [2, '數字', '附標']],

['更多選項', is更多選項],
...(is更多選項 ? [
'更多選項',
['清聲母入聲調分派層次',
[ 2,
'皆派入上聲',
'皆派入陰平',
'次清、擦音和零聲母字派入去聲,其餘派入陽平',
'次清和零聲母字派入去聲,其餘派入陽平',
'連同濁聲母、所有入聲字皆派入去聲'
]
],
['常母平聲陰聲韻聲母和船母平聲聲母', [2, 'ch', 'sh']],
// '', // 在 v0.1 推導器中使「恢復預設值」按鈕位於下一行
] : []),
];

const 聲母規則 = () => when([
Expand Down Expand Up @@ -38,13 +65,13 @@ const 聲母規則 = () => when([

['莊母', 'zh'],
['初母', 'ch'],
['崇母', [['平聲', 'ch'], ['', 'sh']]],
['崇母', [['平聲', 'ch'], ['', 'zh']]],
['生母', 'sh'],
['俟母', 'sh'],

['章母', 'zh'],
['昌母', 'ch'],
['常母', [['平聲', 'ch'], ['', 'sh']]],
['常母', [['平聲 陽聲韻', 'ch'], ['', 'sh']]],
['書母', 'sh'],
['船母', 'sh'],
['日母', 'r'],
Expand Down Expand Up @@ -177,7 +204,7 @@ const 聲調規則 = () => when([
['平聲', '1'],
['上聲', '3'],
['去聲', '4'],
['入聲', ''],
['入聲', '1'],
]],
['濁音', [
['平聲', '2'],
Expand All @@ -191,6 +218,38 @@ let 聲母 = 聲母規則();
let 韻母 = is`舒聲` ? 舒聲韻母規則() : 入聲韻母規則();
let 聲調 = 聲調規則();

if (選項.更多選項) {
// 參考 https://www.zhihu.com/question/526195183/answer/2425807330
if (is`(常母 陰聲韻 或 船母) 平聲`) 聲母 = 選項.常母平聲陰聲韻聲母和船母平聲聲母;

/* 參考
* http://ccj.pku.edu.cn/Article/DownLoad?id=271015083&&type=ArticleFile (https://web.archive.org/web/20240223084634/http://ccj.pku.edu.cn/Article/DownLoad?id=271015083&&type=ArticleFile)
* https://www.zhihu.com/question/30370012/answer/533234460
* https://www.zhihu.com/question/30370012/answer/535713330
*/
if (is`入聲`) {
switch (選項.清聲母入聲調分派層次) {
case '皆派入上聲':
if (is`清音`) 聲調 = '3';
break;
case '皆派入陰平':
if (is`清音`) 聲調 = '1';
break;
case '次清、擦音和零聲母字派入去聲,其餘派入陽平':
if (is`心生書影曉母 或 次清`) 聲調 = '4';
else if (is`全清`) 聲調 = '2';
break;
case '次清和零聲母字派入去聲,其餘派入陽平':
if (is`影母 或 次清`) 聲調 = '4';
else if (is`全清`) 聲調 = '2';
break;
case '連同濁聲母、所有入聲字皆派入去聲':
聲調 = '4';
break;
}
}
}

if (['i', 'ü'].includes(韻母[0])) 聲母 = {
g: 'j', k: 'q', h: 'x',
z: 'j', c: 'q', s: 'x',
Expand Down

0 comments on commit b5a986a

Please sign in to comment.