Open joanise opened 2 years ago
In some mappings, we use context_after = \s|$ to do some processing on the end of a word.
context_after = \s|$
Examples:
French:
fra_to_ipa.csv
` to delete the silent word-final "s" (changed to
g2p convert "tests, tests tests"
tʌsts, tʌst tʌst
Mi'kmaq:
mic_to_ipa.json
$
g2p convert "tt" mic mic-ipa
tət
g2p convert "tt, tt tt" mic mic-ipa
ətt, tt tət
Several other mappings use $ one way or another.
Not sure what the best solution is. \b is also not always right, (e.g., it's incompatible with prevent_feeding). It fixes French, in any case.
\b
prevent_feeding
@roedoejet not sure if #277 fixes this or not. I'm pretty sure it will make rule writing easier, but I expect there are still corner cases where "end of word" will remain difficult to define reliably.
In some mappings, we use
context_after = \s|$
to do some processing on the end of a word.Examples:
French:
fra_to_ipa.csv
had rules like` to delete the silent word-final "s" (changed to
\b` on 2021-11-01)g2p convert "tests, tests tests"
outputstʌsts, tʌst tʌst
, showing that before a space, and string final, it works, but not before a comma.Mi'kmaq:
mic_to_ipa.json
uses$
to match word-final.g2p convert "tt" mic mic-ipa
outputstət
g2p convert "tt, tt tt" mic mic-ipa
outputsətt, tt tət
Several other mappings use
$
one way or another.Not sure what the best solution is.
\b
is also not always right, (e.g., it's incompatible withprevent_feeding
). It fixes French, in any case.