Skip to content

Commit

Permalink
fix(音韻地位): make 驗證 more restrictive
Browse files Browse the repository at this point in the history
音韻地位s that are known to exist are not affected.

- 端四類隔 restricted to 脂真麻清幽侵韻
- 脣音 not allowed in 之魚殷痕韻
- 莊組 not allowed in 麻(三)清幽韻
- non-莊組 acute initials not allowed in 庚三 & 蒸合
  • Loading branch information
syimyuzya committed Jul 26, 2024
1 parent 54edb35 commit 9458d86
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/lib/音韻地位.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ test('不合法音韻地位', t => {
testCase('明三陽去', /missing 類 \(should be C typically\)/, '類搭配(韻,可能有邊緣地位)');
testCase('幫三B清入', /unexpected 幫母清韻B類/, '類搭配(綜合)');
testCase('幫三C嚴入', /unexpected 嚴韻脣音/, '母搭配(凡韻)');
testCase('幫三C之平', /unexpected 之韻脣音/, '母搭配(脣音之韻)');
testCase('初開三真去', /unexpected 真韻開口莊組/, '母搭配(臻韻)');
testCase('知開三庚平', /unexpected 庚韻三等知母/, '母搭配(非莊組銳聲母)');
});

test('邊緣地位', t => {
Expand Down
17 changes: 12 additions & 5 deletions src/lib/音韻地位.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,12 +971,14 @@ export class 音韻地位 {
}
}
// 等-韻
for (const [搭配各等, 搭配各韻] of Object.entries(等韻搭配)) {
if (搭配各韻.includes()) {
if ([...搭配各等].includes() || ([...搭配各等].includes('三') && === '四' && [...'端透定泥'].includes())) {
if ( === '四' && [...'端透定泥'].includes() && [...'脂真麻清幽侵'].includes()) {
// 允許,但均為邊緣地位
} else {
for (const [搭配各等, 搭配各韻] of Object.entries(等韻搭配)) {
if (搭配各韻.includes()) {
[...搭配各等].includes() || reject(`unexpected ${}${}等`);
break;
}
reject(`unexpected ${}${}等`);
}
}
// 母-呼(基本)、呼-韻
Expand Down Expand Up @@ -1016,14 +1018,19 @@ export class 音韻地位 {

// 母-韻
if ([...'幫滂並明'].includes()) {
=== '嚴' && reject(`unexpected 嚴韻脣音`);
[...'之魚殷痕嚴'].includes() && reject(`unexpected ${}韻脣音`);
} else {
=== '凡' && reject(`unexpected 凡韻非脣音`);
}
if ([...'莊初崇生俟'].includes()) {
=== '三' && ['麻', '清', '幽'].includes() && reject(`unexpected ${}${ === '麻' ? '三等' : ''}莊組`);
=== '開' && ['真', '殷'].includes() && reject(`unexpected ${}韻開口莊組`);
} else {
=== '臻' && reject(`unexpected 臻韻非莊組`);
if (!鈍音母.includes()) {
=== '庚' && === '三' && reject(`unexpected 庚韻三等${}母`);
=== '蒸' && === '合' && reject(`unexpected 蒸韻合口${}母`);
}
}

// 邊緣搭配
Expand Down

0 comments on commit 9458d86

Please sign in to comment.