Skip to content

Add Taiwan regional mappings for 樑/梁 - #1407

Merged
frankslin merged 17 commits into
BYVoid:masterfrom
LeeiFrankJaw:Taiwan
Jul 12, 2026
Merged

frankslin merged 17 commits into
BYVoid:masterfrom
LeeiFrankJaw:Taiwan

Conversation

@LeeiFrankJaw

@LeeiFrankJaw LeeiFrankJaw commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Pros and cons of these mappings are as follows.


Pros:

The dictionaries from Taiwan consistently specify that 樑 is a variant of 梁, and there is no words containing 樑 from 重編國語辭典修訂本 but there are 144 headwords containing 梁 in the same dictionary. The meanings of 樑 are subsumed under 梁, as is shown here. In 教育百科, there are not many results for 樑, which all say that it is the same as 梁. But for 梁, it gives more substantive content. And I take these as the nominative standards.


Cons:

At the same time, I could not deny that 樑 is still used in Taiwan to certain extent. And it is not a dead character. Such usages are often found in niches, technical jargon, and proper names. Also to my knowledge, earlier 中國時報 (from decades ago) used 樑 and 梁 quite interchangeably (but they also used 喫/吃, 峯/峰, 羣/群, and so on so forth in the past). Some real usages with 樑 include 壽樑, 月樑, and 抬樑式. But it is never wrong to write 壽梁, 月梁, or 抬梁式. Proper names would be the only category in which it would be wrong to use 梁 in the place of 樑.


To the best of my knowledge, or at least according to 香港中文書面語語料庫, the usages of 樑 and 梁 in Hong Kong coincide with the OpenCC standard usages.

@frankslin

Copy link
Copy Markdown
Collaborator

Can you add tests to explain what the expected changes are? Add evidence of how these characters are actually used in Taiwan? Does HKVariantsRev need similar mappings?

石梁 is also a name for the calligrapher who compiled [草字彙][1], a
name for a politician from Ming dynasty, a name for several geographical
places, and a name for possibly many others.

[1]: https://www.shidianguji.com/book/NGJ892411999032358230371/chapter/1lqducz0jjh22
Incorporate personal names from STPhrases.txt to TWVariantsPhrases.txt.
@LeeiFrankJaw

LeeiFrankJaw commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor Author

空梁落燕泥 空梁落燕泥

According to the OpenCC standards, here 空梁落燕泥 should be 空樑落燕泥. I could conjecture that it probably is a show of respect for the source (典源). But as I read a lot on 成語典, a lot of Chinese idioms differ from their original sources, especially through semantic divarication of certain characters. Off my mind, I could come up with 一狐之掖, which later becomes 一狐之腋. If OpenCC sincerely believes that 樑 and 梁 should be two characters, then it should not make an exception for idioms like this one.

@LeeiFrankJaw

Copy link
Copy Markdown
Contributor Author

梁木 梁木
梁木其坏 樑木其壞

Same here. But more interestingly, 梁木 stays unchanged but 梁木其壞 becomes 樑木其壞. This is inconsistent.

[梁龍][1] as a personal name is much more [common][2] than [樑龍][3],
the dinosaur.  Even in Hong kong, where 樑 is used for the meaning of
bridge, 梁 is used here nonetheless, even though it originates from the
sense of 雙樑.

[1]: https://zh.wikipedia.org/wiki/%E6%A2%81%E9%BE%99_(%E5%A4%96%E4%BA%A4%E5%AE%98)
[2]: https://baike.baidu.com/item/%E6%A2%81%E9%BE%99/8106905
[3]: https://zh.wikipedia.org/zh-hk/%E6%A2%81%E9%BE%8D%E5%B1%AC
@LeeiFrankJaw

Copy link
Copy Markdown
Contributor Author

黄梁 黃梁
黄梁梦 黃梁夢
黄梁美梦 黃樑美夢

Here, they are not only inconsistent but also misspellings. They should be 黃粱 instead of 黃梁.

@frankslin

Copy link
Copy Markdown
Collaborator

梁木 梁木
梁木其坏 樑木其壞

Same here. But more interestingly, 梁木 stays unchanged but 梁木其壞 becomes 樑木其壞. This is inconsistent.

It looks like the original form of the idiom is 梁木其壞.
https://dict.idioms.moe.edu.tw/idiomView.jsp?ID=27555&webMd=1&la=0

@frankslin

Copy link
Copy Markdown
Collaborator

How about these in STPhrases.txt? Should they be all 梁 except 「张栋梁 / 張棟樑」?
Or should we align with 成語典 (e.g. 上梁不正下梁歪, 餘音繞樑, 獨挑大樑)?

STPhrases.txt
905:上梁	上樑
906:上梁不正	上樑不正
907:上梁不正下梁歪	上樑不正下樑歪
964:下梁	下樑
2154:主梁	主樑
4229:余音绕梁	餘音繞樑
4984:偷梁换柱	偷樑換柱
5214:光脊梁	光脊樑
12624:叶步梁	葉步樑
16017:国梁	國樑
16125:圈梁	圈樑
17334:大梁	大梁 大樑
18907:小丑跳梁	小醜跳樑
19374:屋梁	屋樑
19438:山梁	山樑
21561:张栋梁	張棟樑
23324:悬梁	懸樑
23325:悬梁刺股	懸樑刺股
23326:悬梁自尽	懸樑自盡
23332:悬臂梁	懸臂樑
23737:戳脊梁	戳脊樑
24388:扛大梁	扛大樑
25621:挑大梁	挑大樑
25626:挑正梁	挑正樑
26176:提梁	提樑
27647:无梁	無樑
27648:无梁斗	無樑斗
27649:无梁楼盖	無樑樓蓋
28860:木梁	木樑
29459:杨士梁	楊士樑
29999:林国梁	林國樑
30021:林杰梁	林杰樑
30086:架梁	架樑
30177:柱梁	柱樑
30262:栋梁	棟樑
30263:栋梁之任	棟樑之任
30264:栋梁之材	棟樑之材
30265:栋梁之臣	棟樑之臣
30275:树梁	樹樑
30526:桥梁	橋樑
30527:桥梁工事	橋樑工事
30528:桥梁工程	橋樑工程
30533:梁上	樑上
30534:梁上君子	樑上君子
30556:梁子	樑子
30583:梁木其坏	樑木其壞
30584:梁架	樑架
30585:梁柱	樑柱
30586:梁栋	樑棟
30613:梁龙	樑龍
30840:横梁	橫樑
31048:正梁	正樑
31969:没脊梁	沒脊樑
32434:津梁	津樑
34591:独挑大梁	獨挑大樑
35231:画栋雕梁	畫棟雕樑
35233:画梁雕栋	畫樑雕棟
36136:石梁	石樑
36382:磨脊梁	磨脊樑
38397:结梁子	結樑子
38403:绕梁	繞樑
38404:绕梁三日	繞樑三日
38405:绕梁之音	繞樑之音
38406:绕梁韵永	繞樑韻永
38722:罗兴梁	羅興樑
39743:脊梁	脊樑
39744:脊梁背	脊樑背
39745:脊梁骨	脊樑骨
41399:蒋国梁	蔣國樑
44066:跳梁小丑	跳樑小醜
44067:跳梁猖獗之小丑	跳樑猖獗之小醜
44499:过梁	過樑
46165:钢梁	鋼樑
47241:雕梁	雕樑
47242:雕梁画柱	雕樑畫柱
47243:雕梁画栋	雕樑畫棟
47905:顶梁柱	頂樑柱
48201:飞梁	飛樑
48893:黄东梁	黃東樑
49090:鼻梁	鼻樑
49091:鼻梁儿	鼻樑兒
49092:鼻梁骨	鼻樑骨

@LeeiFrankJaw

LeeiFrankJaw commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor Author

I have checked them individually that day. They are all correct. I am kind of busy these two days.

Or should we align with 成語典 (e.g. 上梁不正下梁歪, 餘音繞樑, 獨挑大樑)?

Yes, this is the point I made that day. It is a tough decision to be made.

My personal opinion is: if OpenCC gives reasonably good definitions of how certain character pairs are to be differentiated, then we should convert them according to OpenCC standards regardless of how old (or how classical) they are.

Historically speaking, a lot of idioms now differ from their original form, either through changed in a later period or by the imposition of certain language standards.

The great historian 司馬遷 wrote in 史記·商君列傳:

趙良曰:「千羊之皮,不如一狐之掖;千人之諾諾,不如一士之諤諤。武王諤諤以昌,殷紂墨墨以亡。君若不非武王乎,則仆請終日正言而無誅,可乎?」

Here he actually used 掖 for 腋 in the original source. This passage is in fact quoted in 掖 entry from 重編國語辭典修訂本. However, the same dictionary never use 一狐之掖 in any headwords, as shown in this search result. They actually normalize all versions to 一狐之腋.

Another classical example would be the normalization of 于 to 於. The early Chinese philosopher 晏嬰 wrote in 晏子春秋·內篇·雜篇:

晏子避席對曰:「嬰聞之,橘生淮南則為橘,生于淮北則為枳,葉徒相似,其實味不同。所以然者何?水土異也。今民生長於齊不盜,入楚則盜,得無楚之水土使民善盜耶?」

You see in the original source that he used 于 instead of 於. However, in the entry for 淮南橘,淮北枳, the 于 is normalized to 於. In fact, based on my personal experience, most 于 used as a preposition are normalized to 於 in the materials published by the Ministry of Education.

If they normalize characters used in classical Chinese according to their standards, we should also do this according to our standards. And this is the only way to achieve consistency.

s0130017_0013

《史記·商君列傳》

06076361 cn_0075

《晏子春秋·內篇·雜篇》

@LeeiFrankJaw

LeeiFrankJaw commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor Author

丁字梁 丁字梁

上梁文 上梁文

余响绕梁 餘響繞梁

余音绕梁 餘音繞樑

凿壁悬梁 鑿壁懸梁

刺股悬梁 刺股懸梁

刺骨悬梁 刺骨懸梁

国家栋梁 國家棟梁

在桥梁工地上 在橋梁工地上

大厦栋梁 大廈棟梁

头悬梁锥刺股 頭懸梁錐刺股

平梁 平梁

戳脊梁骨 戳脊梁骨

抚梁易柱 撫梁易柱

抟柱乘梁 摶柱乘梁

板梁桥 板梁橋

架海金梁 架海金梁

柏梁体 柏梁體
柏梁台 柏梁臺
柏梁诗 柏梁詩

梁木 梁木

椽梁 椽梁

横打鼻梁儿 橫打鼻梁兒

歌声绕梁 歌聲繞梁

没梁桶 沒梁桶

河梁 河梁

泰山梁木 泰山梁木

泽梁 澤梁

渔梁 漁梁

濠梁 濠梁

玳梁 玳梁
玳瑁梁 玳瑁梁

白鹤梁 白鶴梁

空梁落燕泥 空梁落燕泥

竖柱上梁 豎柱上梁
竖起脊梁 豎起脊梁

箱梁 箱梁

纵梁 縱梁

背梁骨 背梁骨

落月屋梁 落月屋梁

蠹啄剖梁柱 蠹啄剖梁柱

跳梁 跳梁

顶梁骨走了真魂 頂梁骨走了真魂

鱼梁 魚梁

鼻无梁柱 鼻無梁柱

I believe that all the 梁s from the above should be converted to 樑s according to OpenCC standards. Some terms are more obscure than others and I will explain some of them.

丁字梁 in English is T-beam and it should be converted to 丁字樑 according to OpenCC standards.

上梁 inside 上梁文 has the same meaning of 上梁 as in 豎柱上梁. It was a literature style originating from the Six Dynasties. It was a kind of essay you wrote to send your good wishes to the owner of the new house being built after the main beam (主梁) was installed. It could also mean the text on the 上樑記牌 of a house. In either case, it should be converted to 樑 according to OpenCC standards.

平梁 could mean a type of beam used in construction. Or it could also mean a flat (landform). In either case, we should convert it to 樑 according to OpenCC standards.

板梁 inside 板梁橋 mean plate girders, and a 板梁橋 just means a plate girder bridge.

柏梁s inside 柏梁體, 柏梁臺, and 柏梁詩 all refer to the beam made out of cedar wood.

椽梁 just means rafters.

A 沒梁桶 means a bucket without handle. It was often used a part of 歇後語.

澤梁 and 漁梁 (or 魚梁) are fishing weirs of various types.

A 濠梁 just means a bridge over a river.

玳梁 or 玳瑁梁 means delicately embellished beams of a house.

白鶴梁 is a natural stone bridge in 重慶.

A 箱梁 means a box girder.

A 縱梁 means a longeron on an aircraft.

Of course, a decision must be made about those words or phrases which were formed long before the Vernacular Movement (白話文運動). Should they be kept in the original forms? Or they should be converted nonetheless.

卞梁 卞梁

My first thought about this word is that it was a misspelling of 汴梁. Then I realized that it could also be a personal name. And I found out that a fictional character from a TV drama premiered in 2019 with the same name. However, given the fact this line was added in 2010 (commit 09bb6ca), it was unlikely the original author could foresee a fictional character 9 years later.

高梁米 高梁米
高梁酒 高梁酒

Here again, 高梁s (从木) are misspellings of 高粱s (从米).

 * Incorporate phrases containing 樑 from STPhrases.txt to
   TWVariantsRevPhrases.txt.

 * Also update testcases.json.
@LeeiFrankJaw
LeeiFrankJaw marked this pull request as ready for review July 10, 2026 18:15
Comment thread test/testcases/testcases.json Outdated
@LeeiFrankJaw
LeeiFrankJaw marked this pull request as draft July 11, 2026 13:39
@LeeiFrankJaw

LeeiFrankJaw commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor Author

小丑 小丑 小醜
小丑丫鬟 小醜丫鬟
小丑跳梁 小醜跳樑

# keep: intentional traditional key
幺麼小丑 幺麼小醜
幺麽小丑 幺麼小醜

跳梁小丑 跳樑小醜
跳梁猖獗之小丑 跳樑猖獗之小醜

Here are some inconsistencies.

In any case, 小丑丫鬟 should be converted to itself (小丑丫鬟).

In the case of 跳梁小丑 family of phrases, the situation is more complicated. According to both source (典源) and meaning (釋義), it should be 小醜. But according to frequency, in both Taiwan and Hong Kong, people tend to use 小丑 a lot more than 小醜 in these phrases.

@LeeiFrankJaw
LeeiFrankJaw marked this pull request as ready for review July 11, 2026 20:41
@LeeiFrankJaw
LeeiFrankJaw marked this pull request as draft July 12, 2026 08:26
梁鸿 梁鴻
梁鸿五噫 梁鴻五噫
梁龙 樑龍
梁龙 梁龍 樑龍

@LeeiFrankJaw LeeiFrankJaw Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A real world usage of 梁龍 in Hong Kong other than Wikipedia would be this.

Apply OpenCC standards to the list of words mentioned in this
[comment][1].

[1]: BYVoid#1407 (comment)
上梁不正下梁歪 上樑不正下樑歪
上梁山 上梁山
上梁文 上梁文
上梁文 上樑文

@LeeiFrankJaw LeeiFrankJaw Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

落地签证 落地簽證
落托 落托
落月屋梁 落月屋梁
落月屋梁 落月屋樑

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

空杯 空杯
空柜子 空櫃子
空梁落燕泥 空梁落燕泥
空梁落燕泥 空樑落燕泥

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

白驹空谷 白駒空谷
白骨松 白骨松
白鹤梁 白鶴梁
白鹤梁 白鶴梁 白鶴樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「白鶴樑」用例1(「白鶴樑」僅出現 1 次,其餘皆為「白鶴梁」)
「白鶴樑」用例2(大公報)(出現 4 次,皆為「白鶴樑」)

Comment on lines +34791 to +34792
玳梁 玳樑
玳瑁梁 玳瑁樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

濒于绝种 瀕於絕種
濒危物种 瀕危物種
濠梁 濠梁
濠梁 濠樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

渐暗 漸暗
渔娘 漁娘
渔梁 漁梁
渔梁 漁樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

泰山北斗 泰山北斗
泰山娘娘 泰山娘娘
泰山梁木 泰山梁木
泰山梁木 泰山樑木

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

河曲县 河曲縣
河曲智叟 河曲智叟
河梁 河梁
河梁 河樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

椰胡 椰胡
椰雕 椰雕
椽梁 椽梁
椽梁 椽樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「椽樑」用例(香港政府某部門的網站)

Comment on lines +30582 to 30583
梁木 梁木 樑木
梁木其坏 樑木其壞

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

架回来 架回來
架梁 架樑
架海金梁 架海金梁
架海金梁 架海金樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

板桥市 板橋市
板桩 板樁
板梁桥 板梁橋
板梁桥 板樑橋

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抚松 撫松
抚松县 撫松縣
抚梁易柱 撫梁易柱
抚梁易柱 撫樑易柱

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

国家标准化管理委员会 國家標準化管理委員會
国家标准码 國家標準碼
国家栋梁 國家棟梁
国家栋梁 國家棟樑

ghost Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「國家棟樑」用例(文匯報)

Comment on lines 7696 to +8593
@@ -8587,10 +8587,10 @@
刺枪术 刺槍術
刺激启动不同步 刺激啓動不同步
刺绣 刺繡
刺股悬梁 刺股懸梁
刺股悬梁 刺股懸樑
刺胳针 刺胳針
刺针 刺針
刺骨悬梁 刺骨懸梁
刺骨悬梁 刺骨懸樑

ghost Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -48608,8 +48609,6 @@
高梁 高梁

ghost Jul 12, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment?

# 日本岡山縣地名

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, 高梁 is read as たかはし, which normally will be rendered as 高橋 using Kanji.

蠹众木折 蠹衆木折
蠹众而木折隙大而墙坏 蠹衆而木折隙大而牆壞
蠹啄剖梁柱 蠹啄剖梁柱
蠹啄剖梁柱 蠹啄剖樑柱

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鱼松 魚鬆
鱼板 魚板
鱼梁 魚梁
鱼梁 魚樑

ghost Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「魚樑」用例(大公報)

@LeeiFrankJaw
LeeiFrankJaw marked this pull request as ready for review July 12, 2026 15:58
@LeeiFrankJaw
LeeiFrankJaw marked this pull request as draft July 12, 2026 16:56
@LeeiFrankJaw
LeeiFrankJaw marked this pull request as ready for review July 12, 2026 17:08
Keep this PR focused on the 樑/梁 beam-vs-name distinction. The
小丑丫鬟, 幺麼小丑 and 幺麽小丑 entries only flipped 丑/醜 primary
selection with no 梁 involved, so restore their original 小醜 targets;
the 跳梁小丑 family is kept because those changes are bundled with the
梁→樑 conversion. testcases.json case_057 now expects 幺麼小醜 to match.
@frankslin
frankslin merged commit 338a16c into BYVoid:master Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants