Repository navigation
Declare phrase-level character mapping dependencies - #1282
Conversation
Phrase dictionaries can continue to convert a character A to B even after the corresponding character-level A-to-B rule has been removed. That makes the remaining phrase entries an implicit dependency and can hide the fact that A-to-B is still supported in specific words. Add a dictionary test that compares equal-length phrase mappings with their corresponding character dictionaries. Whenever a phrase maps A to B at the same character position, the character dictionary must still list B as a candidate for A. If B should no longer be the default, the dictionary should keep it as a non-default candidate such as A<TAB>A B rather than deleting it outright. Backfill the currently implicit ST, TS, and HK character candidates and add the reverse variant identity exceptions required by the expanded character candidate sets. Document the maintenance rule in CONTRIBUTING.md.
e0e5e77 to
f12d9e8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f12d9e8698
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
STPhrases.txt 的下列三條可能有點問題。 另外,"呆"是不是適合轉為繁體"待" ,不在此討論。 2.切面 切面 切麵 如果上述正確,則PR新增的TWVariantsRevPhrases.txt下列兩條也要評估應該怎麼修改。 |
|
我開了 #1288 處理相關問題。 |
|
感谢讨论。 关于「呆着 / 待着」我的理解是,如果「呆着」是一个台湾、香港都接受的正确写法,这里其实应当保留而不是转换为另一个可以接受的词。 另外,关于「著/着」,虽然以前讨论过多次,不记得有没有人贴过这篇文章的链接: 我理解 OpenCC 中合理的做法可能是: 此文作者的观点总结如下: 「著」与「着」的关系总结字形来源「着」并非简化字,而是「著」在书法书写中自然演变出的俗体变体:
读音与职能分化「著」历史上有多个读音,主要分两类:
为区分这两类读音,人们逐渐约定俗成:去声用「著」,入声用「着」。这一分化在明代字书中已有记录。 各地规范比较
有趣的例外「土著」一词,按中古汉语读音本应读入声,理论上大陆和香港也该写「土着」,日本确实如此写(土着)。 |
|
就如在 #1281 (comment) 提過的,許多字本來就不應該在 s2t/t2s 做處理。 「呆/待」本來就無繁簡字或異體字關係,本質上就不是簡繁轉換的範疇。 「待著/待在」、「呆著/呆在」台灣都會用,但意義不同,「待著/待在」是單純「停留/等待」的意思,「呆著/呆在」則比較有「發楞/發悶」的意思。 中國大陸似乎也是二者都用,但「呆著/呆在」常常也用在單純「停留/等待」。 二者是細微的語感和使用傾向不同,但並無絕對性,可以考慮做地區詞彙轉換,但恐怕也很難準確。 其他如這次引進的「具/俱」、「坐/座」也都不是繁簡關係,應該要擇日修正這些歷史錯誤,不過最好等 s2hkp 處理好再做,否則不便處理香港的詞彙轉換。 「穗/繐」、「筱/篠」、「耇/耈」非《通規》定義的繁簡字或異體字,但有異體字關係,並非絕對不能在 s2t/t2s 處理,只是可能要先釐清異體關係及各地實際使用情況。 |
* 修正不當簡繁轉換: 着、麵、飮、鯰 - 着:OpenCC 正體取「着」「著」,修正不當互轉的相關詞項。 - 麵:OpenCC 正體取「麪」,修正誤輸出異體字「麵」的相關詞項。 - 飮:OpenCC 正體取「飲」,修正誤輸出異體字「飮」的相關詞項。 - 鯰:OpenCC 既有「鯰/鲶」「鮎/鲇」,修正不當互轉的相關詞項。 * 移除不當簡繁轉換: 蔽 => 庇 - 「蔽」、「庇」並非繁簡或異體字關係,不宜互轉 - 傳統中文通常用「蔭蔽」(偏向遮蔽義)或「蔭庇」、「廕庇」(偏向庇護義),原則上不用「廕蔽」 - 中國大陸將「蔭」、「廕」簡化為「荫」,習慣用「荫蔽」、「荫庇」 * 移除不當簡繁轉換: 酰 => 醯 - 二字非簡化字或異體字關係。化學 Acyl group 台灣稱「醯基」,中國大陸習用「酰基」,屬地區詞轉換,亦已收錄於 TWPhrases 之中。 - 修正 谷氨酰胺(s) => 穀氨酰胺(t) => 麩醯胺酸(tw) 轉換
Phrase dictionaries can continue to convert a character A to B even after the corresponding character-level A-to-B rule has been removed. That makes the remaining phrase entries an implicit dependency and can hide the fact that A-to-B is still supported in specific words.
Add a dictionary test that compares equal-length phrase mappings with their corresponding character dictionaries. Whenever a phrase maps A to B at the same character position, the character dictionary must still list B as a candidate for A. If B should no longer be the default, the dictionary should keep it as a non-default candidate such as AA B rather than deleting it outright.
Backfill the currently implicit ST, TS, and HK character candidates and add the reverse variant identity exceptions required by the expanded character candidate sets. Document the maintenance rule in CONTRIBUTING.md.