Skip to content

Commit

Permalink
Fix mid_tang: 後高元音
Browse files Browse the repository at this point in the history
  • Loading branch information
untunt committed Jan 15, 2024
1 parent 45968e5 commit 0243b80
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions mid_tang.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@ if (!音韻地位) return [

'韻',
['低元音', [2, '前\u2006æ 後\u2006a', '前\u2006æ 後\u2006ɑ', '前\u2006a 後\u2006ɑ']],
['後高元音' + 刷新, [is盛唐 ? 2 : 1, 'ɨ', '開音節\u2006ɨ 閉音節\u2006ə', '開音節\u2006ɯ 閉音節\u2006ə', 'ə']],
[刷新 + '後高元音', [is盛唐 ? 2 : 1,
'ɨ',
'痕魂\u2006ə 其他\u2006ɨ',
'閉音節\u2006ə 開音節\u2006ɨ',
'閉音節\u2006ə 開音節\u2006ɯ',
'ə',
]],
['同攝 BC 韻合併' + 刷新, !is盛唐],
['清青合併' + 刷新, !is盛唐],
['咍泰合併' + 刷新, !is盛唐],
['輕脣東鍾合併' + 刷新, !is盛唐],
['部分蟹攝二等入假攝' + 刷新, !is韻圖],
['部分流攝脣音入遇攝' + 刷新, !is韻圖],
選項.顯示更多選項 ? ['覃談合併' + 刷新, true] : [],
Expand Down Expand Up @@ -164,7 +171,7 @@ function get韻基() {
['', 'i'],
]],
['蟹攝', [ // /aj/
[!選項.BC合併 && '廢韻', 'ɜj'],
[!選項.BC合併 && '廢韻', 'əj'],
[三四, 'ɛj'],
[, 'æj'],
[!選項.咍泰合併 && '咍灰韻', 'əj'],
Expand All @@ -177,7 +184,7 @@ function get韻基() {
['', 'in'],
]],
['山攝 或 元韻', [ // /an/
[!選項.BC合併 && '元韻', 'ɜn'],
[!選項.BC合併 && '元韻', 'ən'],
[三四, 'ɛn'],
[, 'æn'],
[, 'ɑn'],
Expand All @@ -193,7 +200,7 @@ function get韻基() {
]],
['曾攝', 'ɨŋ'], // /ɨŋˠ/
['通攝', [ // /ɨwŋˤ/
[輕唇化條件, 'uŋ'], // 輕唇不分東鍾
[選項.輕脣東鍾合併 && 輕唇化條件, 'uŋ'],
['鍾韻', 'uŋ'], // /wɨwŋˤ/ 同時相當於 /wɨŋˤ/
['', 'ɨwŋ'],
]],
Expand All @@ -215,7 +222,7 @@ function get韻基() {
['', 'im'],
]],
['咸攝', [ // /am/
[!選項.BC合併 && '嚴凡韻', 'ɜm'],
[!選項.BC合併 && '嚴凡韻', 'əm'],
[三四, 'ɛm'],
[, 'æm'],
[!選項.覃談合併 && '覃韻', 'əm'],
Expand All @@ -227,8 +234,10 @@ function get韻基() {
result = result.replace('æ', 兩個低元音[0]);
result = result.replace('ɑ', 兩個低元音[1]);
let 兩個後高元音 = 選項.後高元音.split(' ').map(e => e.slice(-1));
result = result.replace(/ɨ(?=$|j)/, 兩個後高元音[0]);
result = result.replace(/ɨ(?=[^j])/, 兩個後高元音.slice(-1));
result = result.replace(/ɨ(?=$|[^j])/, 兩個後高元音[ // 微韻被排除
選項.後高元音.includes('痕魂') ? 1 - is`痕魂韻` :
選項.後高元音.includes('開音節') ? 0 + is`魚韻` : 0
]);
return result;
}

Expand Down

0 comments on commit 0243b80

Please sign in to comment.