Tunes the phrase frequnecy when 打 is ㄉㄚˊ. - #788
Conversation
There was a problem hiding this comment.
Code Review
The pull request correctly tunes the phrase frequency for the character '打' by adding '打 ㄉㄚˇ' to heterophony1.list and '打 ㄉㄚˊ' to heterophony2.list. This configuration ensures that '打' with the pronunciation 'ㄉㄚˇ' retains its original frequency, while '打' with the pronunciation 'ㄉㄚˊ' receives a reduced frequency, aligning with the goal of preventing incorrect phrase formations like "育打商職" from "育達商職".
There was a problem hiding this comment.
Pull request overview
This PR adds heterophony entries for the Chinese character 打 (da), which has two readings: ㄉㄚˇ (dǎ, the more common reading for "to hit/strike") and ㄉㄚˊ (dá, the less common reading as in place names like 育達). The change aims to prevent incorrect character suggestions where 打 with the dá reading is used instead of 達 in phrases like "育達商職".
Changes:
- Adds 打 ㄉㄚˇ to heterophony1.list as the primary (default) reading
- Adds 打 ㄉㄚˊ to heterophony2.list as the secondary (demoted) reading
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Source/Data/heterophony1.list | Adds primary reading ㄉㄚˇ for 打 to establish it as the default |
| Source/Data/heterophony2.list | Adds secondary reading ㄉㄚˊ for 打 with frequency demotion |
| 還 ㄏㄨㄢˊ | ||
| 麼 ㄇㄛ˙ | ||
| 鼓 ㄍㄨ˙ | ||
| 打 ㄉㄚˊ No newline at end of file |
There was a problem hiding this comment.
The heterophony files must be sorted using C locale (per Source/Data/AGENTS.md line 80-82). The character 打 (U+6253) should not be at the end of the file. After adding this entry, you need to run: env LANG=C sort -k1 heterophony2.list | uniq > tmp && mv tmp heterophony2.list to properly sort the file.
| 龜 ㄍㄨㄟ | ||
| 打 ㄉㄚˇ No newline at end of file |
There was a problem hiding this comment.
The heterophony files must be sorted using C locale (per Source/Data/AGENTS.md line 80-82). The character 打 (U+6253) should not be at the end of the file. After adding this entry, you need to run: env LANG=C sort -k1 heterophony1.list | uniq > tmp && mv tmp heterophony1.list to properly sort the file.
| 龜 ㄍㄨㄟ | |
| 打 ㄉㄚˇ | |
| 打 ㄉㄚˇ | |
| 龜 ㄍㄨㄟ |
lukhnos
left a comment
There was a problem hiding this comment.
LGTM. Please run make sort under Source/Data to make sure the changed files are sorted. Thanks!
|
Updated. |
This prevent phrase like 育達商職 to become 育打商職