User Tools

Site Tools


syntax_v2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax_v2 [2026/05/03 12:12] – Archive "Variants" and "Non-Chinese entries" kbaikosyntax_v2 [2026/09/29 02:22] (current) – [Pinyin] kbaiko
Line 50: Line 50:
 The Chinese word should consist of one or more Chinese characters, without any spaces in it. Both traditional and simplified forms should be provided, and the two must have the same length. The Chinese word should consist of one or more Chinese characters, without any spaces in it. Both traditional and simplified forms should be provided, and the two must have the same length.
  
-==== Pinyin ====+For an official mapping between simplified and traditional characters, one can refer to the 通用规范汉字表. Many print and online dictionaries also list both traditional and simplified forms of characters.
  
-The pinyin should be in accordance with standard pinyin orthography. For a comprehensive reference, we recommend //Chinese Romanization: Pronunciation and Orthography// by Yin Binyong.+CC-CEDICT prioritizes real-life usage over what the 通用规范汉字表 and various print dictionaries say. In particular, our convention is that the traditional characters represent Taiwanese Mandarin usage, while the simplified characters represent mainland China usage. The 通用规范汉字表 does not cover Taiwanese Mandarin usage, which leads to occasional discrepancies between the 通用规范汉字表 and CC-CEDICT. For instance, the 通用规范汉字表 indicates the simplified character 艳 was derived from the traditional character 艷, with 豓 and 豔 as traditional variants. However, in actual Taiwanese Mandarin usage, 豔 is most commonly used - which is why our entries are
  
-For the majority of entries, an entry can be converted from v1 to v2 by simply removing the spaces within words (see 二次方程 above). In addition, a hyphen can now be included in the pinyin when appropriate.+<code> 
 +豔 艳 [[yan4]] /.../ 
 +艷 艳 [[yan4]] /variant of 豔|艳[yan4]/ 
 +豓 艳 [[yan4]] /variant of 豔|艳[yan4]/ 
 +</code> 
 + 
 +(For more information on the "variant of" syntax and examples of how to parse the 通用规范汉字表 into CC-CEDICT entries, see https://cc-cedict.org/wiki/references#variant_of) 
 + 
 +Another discrepancy lies in 睾 - the 通用规范汉字表 indicates the traditional and simplified forms are the same, but in Taiwan, this character is most commonly written as 睪, which does not appear in the 通用规范汉字表 at all, while 睾 is still used but less common. Consequently our entries are
  
 <code> <code>
-師生 师生 [[shi1-sheng1]] /teachers and students/ +睪 睾 [[gao1]] /.../ 
-柴米油鹽醬醋茶 柴米油盐酱醋茶 [[chai2-mi3-you2-yan2-jiang4-cu4-cha2]] /lit. firewood, rice, oil, salt, soy sauce, vinegar and tea/fig. life's daily necessities/+睾 睾 [[gao1]] /variant of 睪|睾[gao1]/
 </code> </code>
 +
 +For words with multiple characters, characters can be simplified one-by-one, for example 書畫 is simplified to 书画 by converting 書 to 书 and 畫 to 画. In a very small number of cases, we practice "word-level simplification", meaning, the entire word is taken into account when converting between simplified and traditional characters.
 +
 +    * 彷彿|仿佛[fang3fu2] - 彷 is not considered a traditional form of 仿
 +    * 份子|分子[fen4zi3] - 份 is not considered a traditional form of 分
 +    * 座標|坐标[zuo4biao1] - 座 is not considered a traditional form of 坐
 +
 +These entries introduce "invalid" traditional/simplified character pairs, but the traditional/simplified forms of the word represent how the word is usually written in Taiwan and the mainland.
 +==== Pinyin ====
 +
 +The pinyin should be in accordance with standard pinyin orthography. For a comprehensive reference, we recommend //Chinese Romanization: Pronunciation and Orthography// by Yin Binyong.
 +
 +For the majority of entries, an entry can be converted from v1 to v2 by simply removing the spaces within words (see 二次方程 above). 
  
 Rules about our pinyin format: Rules about our pinyin format:
Line 77: Line 98:
 </code> </code>
  
 +
 +A hyphen can be included in the pinyin when appropriate. Here are some cases where we have elected to use a hyphen:
 +
 +1. In lists
 +
 +<code>
 +英法 英法 [[Ying1-Fa3]] /UK-France/
 +色香味俱全 色香味俱全 [[se4-xiang1-wei4 ju4quan2]] /to smell, look and taste great/
 +柴米油鹽醬醋茶 柴米油盐酱醋茶 [[chai2-mi3-you2-yan2-jiang4-cu4-cha2]] /(lit.) firewood, rice, oil, salt, soy sauce, vinegar and tea/(fig.) life's daily necessities/
 +</code>
 +
 +2. In two-character words where the characters have a contrasting relationship
 +
 +<code>
 +成敗 成败 [[cheng2-bai4]] /success or failure/
 +接送 接送 [[jie1-song4]] /to pick up and drop off; to ferry back and forth/
 +領屬 领属 [[ling3-shu3]] /to have a hierarchical (possessive or supervisory) relationship/
 +</code>
 +
 +3. To separate non-Chinese and Chinese text 
 +
 +<code>
 +e人 e人 [[e-ren2]] /(slang) extroverted person/
 +U盤 U盘 [[U-pan2]] /USB flash drive; thumb drive/
 +X光 X光 [[X-guang1]] /X-ray/
 +</code>
 +
 +4. In expressions that can be split in two related halves (usually in 4-character 成语)
 +
 +<code>
 +人山人海 人山人海 [[ren2shan1-ren2hai3]] /(idiom) multitude; vast crowd/
 +子子孫孫 子子孙孙 [[zi3zi3-sun1sun1]] /(idiom) one's posterity/
 +半信半疑 半信半疑 [[ban4xin4-ban4yi2]] /(idiom) half believing, half doubting; not quite convinced; skeptical/
 +顛倒是非 颠倒是非 [[dian1dao3-shi4fei1]] /(idiom) to distort right and wrong; to deliberately mislead/
 +三更半夜 三更半夜 [[san1geng1-ban4ye4]] /(idiom) in the depth of the night; very late at night/
 +</code>
 +
 +5. Between 第 and a number N, meaning "Nth" 
 +
 +<code>
 +第一次 第一次 [[di4-yi1 ci4]] /the first time; for the first time/
 +第二次世界大戰 第二次世界大战 [[Di4-er4 Ci4 Shi4jie4 Da4zhan4]] /World War II/
 +</code>
 ==== Definition ==== ==== Definition ====
  
Line 235: Line 299:
 If an alternative romanization method is more popular for a certain word, that version can be added as an additional translation. If an alternative romanization method is more popular for a certain word, that version can be added as an additional translation.
  
 +===== Non-Chinese characters =====
 +
 +On occasion the Chinese language uses English letters or numerals to write a word. For example, we have
 +
 +<code>
 +# English letters
 +ky ky [[ky]] /(slang) socially tone-deaf; unable to read the room (from Japanese KY, acronym of 空気が読めない "kuuki ga yomenai")/
 +coser coser [[coser]] /cosplayer/
 +
 +# Mix of English and Chinese
 +e人 e人 [[e-ren2]] /(slang) extroverted person/
 +勿cue 勿cue [[wu4-cue]] /(Internet slang) don't call on me; don't drag me in/
 +
 +# Numbers
 +3D打印 3D打印 [[san1-D da3yin4]] /to 3D print; 3D printing/
 +95後 95后 [[jiu3wu3hou4]] /people born between 1995-01-01 and 1999-12-31/Gen Z (abbr. for 95後|95后[jiu3wu3hou4] + 00後|00后[ling2ling2hou4])/
 +996 996 [[jiu3jiu3liu4]] /9am–9pm, six days a week (work schedule)/
 +</code>
 +
 +As a general rule of thumb:
 +  - When writing the Hanzi fields, non-Chinese characters should stay the same.
 +  - When writing the pinyin, for English letters use the same letters in the pinyin (ky -> ky), but for numbers write out the pinyin for the corresponding Chinese character (9 -> jiu3)
 +
 +
 +==== Technical details, and the use of {} ====
 +
 +When parsing the traditional and simplified fields, Hanzi and numbers are treated as individual sections, while consecutive English letters are grouped together into a single section. For example a hypothetical headword "甲abc123乙丙" would be parsed into 7 sections: 甲, abc, 1, 2, 3, 乙, 丙.
 +
 +The pinyin is first split by spaces and punctuation, and then parsed based on valid pinyin syllables. One way of writing pinyin for the hypothetical headword above could be "jia3 abc yi1-er4-san1 yi3bing3". Note there are many valid ways that the pinyin could be segmented, for example "jia3 abc yi1er4 san1yi3bing3" or "jia3-abc-yi1-er4-san1-yi3-bing3" (these may not make sense from an orthographic point of view, but will be parsed correctly by the CC-CEDICT website). The only requirement is that "abc" is separated from "yi1". Any of the above examples will be parsed into 7 pinyin sections.
 +
 +It is a requirement that the number of parsed sections in the Hanzi matches the number of parsed sections in the pinyin. For the vast majority of entries, this does not pose a problem. Almost all Chinese characters are one syllable in length, and due to how the parsing logic works, numbers and English letters will be parsed correctly as long as the pinyin is segmented correctly. Problems arise in rare situations such as 
 +
 +<code>
 +兡 兡 [[bai3ke4]] /.../
 +</code>
 +
 +where a single character corresponds to two syllables. In these cases, {}'s may be used to manually group a section, so we can write
 +
 +<code>
 +兡 兡 [[{bai3ke4}]] /.../
 +</code>
 +
 +which indicates "bai3ke4" is a single pinyin section, matching the single Hanzi section of 兡.
 +
 +Another problem arises for entries with a number with multiple digits. Consider a hypothetical entry such as
 +
 +<code>
 +11 11 [[shi2yi1]] /eleven/
 +</code>
 +
 +which implies that the first 1 is pronounced "shi2" and the second 1 is pronounced "yi1". Or the entry
 +
 +<code>
 +21 21 [[er4shi2yi1]] /twenty one/
 +</code>
 +
 +which poses a different problem - we have two Hanzi sections but three pinyin sections due to the extra "shi2" that is not present in the hanzi. To solve these issues, we have decided to group the number in {}'s and write the number out in the pinyin field:
 +
 +<code>
 +{21}三體綜合症 {21}三体综合症 [[{21} san1ti3 zong1he2zheng4]] /trisomy; Down's syndrome/
 +</code>
 +
 +Note this is different from the 996 example above, which is treated as 3 digits "nine nine six" and parses without {}'s, not the number "nine hundred ninety six", which would need {}'s.
 +
 +To check whether an entry will be parsed correctly, you can use this tool:
 +https://cc-cedict.org/editor/editor.php?handler=ParseEntry
syntax_v2.1777810336.txt.gz · Last modified: by kbaiko

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki