KokoroAne zh: erhua merge folds any 'er' syllable (二/而/耳/尔), not only 儿 — 十二, 二千, 女儿 lose a syllable
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #986 di @guoyingtao — integrata
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 40/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- swift
- Ambito
- internationalization
Direzione di ricerca
Start at Sources/FluidAudio/TTS/KokoroAne/G2P/Mandarin/MandarinErhua.swift, around line 43 where the merge condition compares only the pinyin base to "er"; then read MandarinPinyinNormalizer.Syllable to see what information survives normalisation. The fix is to carry the source character (儿/兒) or a flag on the syllable and to port misaki's not_erhua / must_erhua word lists. Done means the table in the issue behaves as expected: 这儿 and 小孩儿 still merge, while 十二, 女儿, 然而 and 木耳 keep a full èr, verified by a new regression test. Note an open pull request (#986) already targets this.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
MandarinErhua.merge folds any syllable whose pinyin base is er into the previous syllable, not only the character 儿. So 二 / 而 / 耳 / 尔 after another syllable are silently dropped and the previous syllable gets an r-coloured final. Numbers are hit hardest: 十二, 二十 (after any syllable), 二千 all lose their 二.
Repro
FluidAudio v0.17.5 (0b1f462); MandarinErhua.swift is unchanged on main. Phonemes from KokoroAneManager(variant: .mandarin).phonemes(for:):
| Input | Phonemes | Heard as | Expected |
|---|---|---|---|
| 相隔二千里 | ㄒ阳1ㄍㄜㄦ2ㄑ言1ㄌㄧ3 |
xiāng gér qiān lǐ | xiāng gé èr qiān lǐ |
| 别了二十年 | ㄅㄝ2ㄌㄜㄦ5ㄕ十2ㄋ言2 |
bié ler shí nián | bié le èr shí nián |
| 第十二回 | ㄉㄧ4ㄕ十ㄦ2ㄏ为2 |
dì shír huí | dì shí èr huí |
| 偶尔 | ㄡㄦ3 |
ǒur | ǒu ěr |
| 然而他 | ㄖㄢㄦ2ㄊㄚ1 |
ránr tā | rán ér tā |
| 木耳 | ㄇㄨㄦ4 |
mùr | mù ěr |
| 女儿 | ㄋㄩㄦ3 |
nǚr | nǚ ér |
| 这儿 | ㄓㄜㄦ4 |
zhèr | zhèr ✓ |
| 小孩儿 | ㄒ要3ㄏㄞㄦ2 |
xiǎo háir | xiǎo háir ✓ |
Found while auditioning public-domain books (鲁迅《故乡》: 「相隔二千余里,别了二十余年」). In long-form reading this comes up constantly: chapter numbers (第十二回), years and counts, and very common words like 女儿, 然而, 偶尔.
Cause
MandarinErhua.swift#L43 matches on the pinyin only:
if cur.base == "er" && shouldMergeInto(prev: prev) {
The doc comment says cases misaki blocks are "already filtered out by the dict.phrases / single-char lookup happening upstream", but the lookup has no way to tell 儿 from 二/而/耳/尔 once everything is pinyin. The sandhi buffer also spans word boundaries (相隔 + 二千), so the index-0 guard doesn't help.
misaki's _merge_erhua only merges when the character is 儿, it is the last character of the word, and the word is not in not_erhua (女儿, 男儿, 婴儿, 孤儿, 幼儿, 花儿, 鸟儿, …), with a must_erhua override list.
Suggested fix
- Carry the source character (or a "came from 儿/兒" flag) on
MandarinPinyinNormalizer.Syllable, and only merge when it is 儿 or 兒. - Port misaki's
not_erhua/must_erhuaword lists so 女儿, 婴儿, 孤儿 and similar words keep a fullér. - A regression test with the table above would cover both the over-merge and the existing 这儿 / 小孩儿 behaviour.
- Lingua principale
- Swift
- Stelle
- 3k
- Fork
- 451
- Merge medio
- 17h 57m
- PR unite (30g)
- 54
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FluidInference/FluidAudio
-
CtcKeywordSpotter: input padding is not zeroed, so CTC log-probs are often independent of the audioAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
FluidInference/FluidAudio#991 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
FluidInference/FluidAudio#990 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
FluidInference/FluidAudio#985 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
FluidInference/FluidAudio#979 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Word end time truncated ~0.5s, opening an inter-word gap that is not silenceForse già presa @maboa l’ha presa 8 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
FluidInference/FluidAudio#971 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di FluidInference/FluidAudio
Issue simili
-
Native HTTP policy fixture rejects its pathless response URLForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug fixed (pending release)
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
vorssaint/vorssaint-utils#2810 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Notion AI: getSpaces response exceeds 5 MB plugin limit for multi-workspace accountsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
steipete/CodexBar#4341 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
kiosk_set_screensaver_mode ignored: mode is not passed through by the notification parserForse già presa @bgoncal l’ha presa oggi. Apertabug ios
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
home-assistant/iOS#6001 ·
I maintainer di solito rispondono entro 1 giorno