User Tools

Site Tools


format: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
format:syntax_v2 [2024/08/05 04:06] – [Comma] richwarmformat:syntax_v2 [2024/09/12 23:02] (current) – [CC-CEDICT V2 Syntax] richwarm
Line 3: Line 3:
 //**TODO:** work in progress!// //**TODO:** work in progress!//
  
-These are guidelines on what CC-CEDICT entries **should** look like. CC-CEDICT still has many old entries that do not comply with these rules yet.+Version 2 (v2) introduces a new syntax for the pinyin of an entry, allowing for the specification of pinyin that follows standard pinyin orthography. In particular, it enables the combination of syllables to form words. For example, in v2, 二次方程 (quadratic equation) can now be written as two words, "er4ci4 fang1cheng2" (i.e., èrcì fāngchéng), rather than as four separate syllables, "er4 ci4 fang1 cheng2", as was required in v1. 
 + 
 +Below are guidelines on what CC-CEDICT entries **should** look like. CC-CEDICT still has many old entries that do not comply with these rules yet.
  
 In particular: In particular:
-  - Prior to April 2022, glosses and senses were separated using a /. As of April 2022, senses are to be separated with a / while glosses are to be separated with a ;. +  - Prior to April 2022, glosses and senses were separated using a /. As of April 2022, senses are to be separated with a / while glosses are to be separated with a ;. (This was a change in v1 format of definitions, but its progressive introduction largely coincides with the conversion of pinyin to v2 format.) 
-  - In December 2023, CC-CEDICT began adopting the v2 format.+  - In December 2023, CC-CEDICT began adopting the v2 pinyin format.
  
-An entry is considered to be in v2 format if it uses double square brackets for the pinyin. However, when updating the pinyin of an entry, the rest of the entry should also be reviewed. If this is done, it means that v2 pinyin format signifies not only that the pinyin format has been updated, but also that the definition has been checked for correctness and proper format: it's a way of keeping track of which entries have old definitions that need to be reviewed.+An entry is considered to be in v2 format if it uses double square brackets for the pinyin.  
 +<code> 
 +[[pin1yin1]] rather than [pin1 yin1] 
 +</code> 
 + 
 +However, when updating the pinyin of an entry, the rest of the entry should also be reviewed. If this is done, it means that v2 pinyin format signifies not only that the pinyin format has been updated, but also that the definition has been checked for correctness and proper format: it's a way of keeping track of which entries have old definitions that need to be reviewed.
  
 As of August 2024, roughly 10% of entries have been converted to v2 by editors.  As of August 2024, roughly 10% of entries have been converted to v2 by editors. 
Line 20: Line 27:
 These three editions are available for download at  These three editions are available for download at 
 https://cc-cedict.org/editor/editor.php?handler=Download https://cc-cedict.org/editor/editor.php?handler=Download
 +
 +When conversion to v2 is complete, the Mixed edition will be the same as Version 2 and therefore redundant, so only Version 1 and Version 2 will be published after that time.
  
 ===== Basic format ===== ===== Basic format =====
Line 33: Line 42:
 </code> </code>
  
-**Important:** It is not allowed for multiple entries in CC-CEDICT to have the same combination of traditional, simplifiedand pinyin. In that case, they must be combined in one entry with their senses joined.+**Important:** It is not allowed for multiple entries in CC-CEDICT to have the same combination of traditional, simplified and pinyin. In fact, the CC-CEDICT Editor website will not allow an editor to create an entry if there already exists an entry with the same trad-simp-pinyin combination. Attempting to do so produces an error message. Note that the pinyin comparison is case-sensitiveso [Wang2] and [wang2] are considered to be different. Therefore, we can have two entries such as the following.
  
 +<code>
 +王 王 [[Wang2]] /surname Wang/
 +王 王 [[wang2]] /king/
 +</code> 
 +
 +If an editor wants to add additional senses for an existing trad-simp-pinyin combination, they should edit its definition rather than create a new entry.
 ==== Traditional and simplified characters ==== ==== Traditional and simplified characters ====
  
Line 47: Line 62:
 K人 K人 [K ren2] /(slang) to hit sb; to beat sb/ K人 K人 [K ren2] /(slang) to hit sb; to beat sb/
 </code> </code>
 +
 +**Below are some notes on how these entries are handled in v2.**
 +
 +Let's take "e人" (extroverted person) as an example.
 +
 +There are several ways one might like to render "e人" in pinyin, such as
 +  - e-rén
 +  - erén
 +  - yìrén
 +
 +The Editor website attempts to match the parts of the headword with the parts of the pinyin, and will, if necessary, treat some parts as "unparsed".
 +
 +For example, in the following entry, "e" is an unparsed element in both the headword and the pinyin, while 人 is matched with "ren2"
 +<code> e人 e人 [[e-ren2]] /(slang) extroverted person/ </code>
 +
 +If the Editor website https://cc-cedict.org/editor/ cannot unambiguously match up the elements of the headword and the pinyin, the entry will not be processed. That is what happens in the following case, where the proposed pinyin is "eren2" rather than "e-ren2".
 +
 +
 +<code> e人 e人 [[eren2]] /(slang) extroverted person/ (Invalid format!)</code>
 +
 +To specify "erén" (as opposed to, say, "e-rén"), it is necessary to use braces to guide the Editor website in parsing. The following would work:
 +<code>e人 e人 [[{e}ren2]] /(slang) extroverted person/</code>
 +
 +... as would several other forms, including
 +<code>{e}人 {e}人 [[{e}ren2]] /(slang) extroverted person/</code>
 +
 +Here is a link to a webpage where a proposed entry can be tested to see if it can be parsed correctly.
 +
 +"Parse entry" webpage:
 +https://cc-cedict.org/editor/editor.php?handler=ParseEntry
 +
 +To specify "yìrén" as the pinyin for e人, no braces are necessary. The following entry can be parsed, as one can verify at the "Parse entry" webpage. "e" will be matched with "yi4", and 人 will be matched with "ren2".
 +
 +<code>e人 e人 [[yi4ren2]] /(slang) extroverted person/</code>
 +
 +Generally, it is regarded as preferable not to indicate the pronunciation of non-Chinese parts of a headword (such as "e" in "e人"). Instead, they can appear as unparsed elements of the pinyin. For example, "e-ren2" is preferred over "yi4ren2"
 +
  
 ==== Pinyin ==== ==== Pinyin ====
Line 76: Line 128:
 </code> </code>
  
-==== In addition: ====+==== Definition ==== 
 + 
 +Definitions should be written in American English. 
 + 
 +Senses should be separated using a slash "/", while glosses within a sense should be separated with a semicolon ";". This means that you can not using / or ; within a definition - for example, "w/o" as an abbreviation of "without" would incorrectly split the definition into two senses. 
 + 
 +Do not add definite or indefinite articles (e.g. "a", "an", "the", etc) to English nouns unless they are necessary to distinguish the word from another usage type or homonym 
 + 
 +Don't use parts of speech. Instead try to give an indication of grammatical usage within the English definition. CC-CEDICT is a human readable descriptive dictionary, not a resource intended for machine processing. 
 + 
 +Abbreviations etc cf e.g. i.e. do not need any further punctuation. 
 + 
 +Extended meanings indicated by lit. .. fig. combination when appropriate or when a common expression refers back to a classical incident or chengyu, one can refer to it with cf (incident in Records of the Historian). 
 + 
 + 
 + 
 +===== Special syntax ===== 
 + 
 +==== Taiwanese pronunciation ==== 
 + 
 +CC-CEDICT follows "standard Mandarin" as used in P.R.China. Mandarin as used in Taiwan sometimes has slight variations in the pronunciation, these can be listed as follows:\\  
 +叔叔 叔叔 [shu1 shu5] /(informal) father's younger brother/uncle/Taiwan pr. shu2 shu5/ 
 + 
 +Taiwanese GuoYu sometimes prefers not to use the neutral tone, so we do not list Taiwan pronunciations when they consist only of saying "don't use the neutral tone". When a character has a "Taiwan pr." notice, then all of its compound need not mention it.   
 + 
 + 
 +==== Ambiguity due to homonyms ==== 
 + 
 +Sometimes words used in the English definitions can have multiple meanings. If the Chinese word does not have these additional meanings, additional information should be provided to prevent ambiguity:\\  
 +首都 首都 [shou3 du1] /capital (city)/ 
 + 
 +The text between the parentheses is "meta-information"; it is not a direct part of the translation, merely to prevent ambiguity.  
 + 
 +==== References ==== 
 + 
 +The English definitions can contain references to other Chinese words. These should be noted as follows:\\  
 +漢字|汉字[Han4 zi4] 
 + 
 +For example:\\  
 +股指 股指 [gu3 zhi3] /stock market index/share price index/abbr. for 股票指數|股票指数[gu3 piao4 zhi3 shu4]/ 
 + 
 +==== Classifiers ==== 
 + 
 +Classifiers (also called "Measure words") can be listed using the following syntax:\\  
 +避風港 避风港 [bi4 feng1 gang3] /haven/refuge/harbor/CL:座[zuo4],個|个[ge4]/ 
 + 
 +Classifiers follow the 'reference' syntax, are prefixed by 'CL:' and separated by a comma (no additional spacing). 
 + 
 +The classifier words itself can be described using:\\  
 +/classifier for small round things (peas, bullets, peanuts, pills, grains etc)/ 
 + 
 +==== Bound forms ==== 
 + 
 +A bound form is a morpheme that only appears as part of a larger expression. In English, bound forms tend to be prefixes or suffixes such as “-ly”, “-est”, “pre-”, “post-” etc and generally are not words by themselves. In Chinese however, characters can either be bound or free, and it can be difficult to determine which. Some characters can have multiple bound and multiple free senses. 
 + 
 +There are two types of bound forms in Chinese, those with meanings and those without. 
 + 
 +=== Meaningful bound forms === 
 + 
 +These are bound forms where a meaning can be assigned to the character. Oftentimes they appear in multiple words with the same meaning, but never by themselves. We indicate these by prefixing the sense with “(bound form)”. 
 + 
 +For instance: 
 + 
 +<code> 
 +隘 隘 [[ai4]] /(bound form) narrow/(bound form) a defile; a narrow pass/ 
 +</code> 
 + 
 +is a bound form as you would not see 隘 alone when reading Chinese. It would always be accompanied by other characters such as 隘口, 隘路, 关隘, 狭隘 etc. 
 + 
 +=== Meaningless bound forms === 
 + 
 +These are bound forms where a meaning cannot be assigned to the character, usually because the character appears in a small number of words (usually just 1). Oftentimes these are the names of plants or animals, or terms used in literature. For these characters, the entry is simply “used in …”. 
 + 
 +For example: 
 + 
 +<code> 
 +鮟 𩽾 [an1] /used in 鮟鱇|𩽾𩾌[an1 kang1]/Taiwan pr. [an4]/ 
 +鱇 𩾌 [[kang1]] /used in 鮟鱇|𩽾𩾌[an1kang1]/ 
 +鮟鱇 𩽾𩾌 [an1 kang1] /anglerfish/ 
 +</code> 
 + 
 +𩽾 and 𩾌 by themselves have no meaning, as they are always used with each other. 𩽾𩾌 is the anglerfish. 
 + 
 +A small number of meaningless bound forms are used in multiple words, in this case, all should be listed. When the words have the same or similar meaning, they should be combined into one sense, when the words have different meanings, they should be separated into different senses. 
 + 
 +Different senses 
 + 
 +<code> 
 +螞 蚂 [[ma3]] /used in 螞蟥|蚂蟥[ma3huang2]/used in 螞蟻|蚂蚁[ma3yi3]/ 
 +蝲 蝲 [la4] /used in 蝲蛄[la4 gu3]/used in 蝲蝲蛄[la4 la4 gu3]/ 
 +蛞 蛞 [[kuo4]] /used in 蛞螻|蛞蝼[kuo4lou2]/used in 蛞蝓[kuo4yu2]/ 
 +猻 狲 [[sun1]] /used in 猢猻|猢狲[hu2sun1]/used in 兔猻|兔狲[tu4sun1]/ 
 +</code> 
 + 
 +Same sense 
 +<code> 
 +箢 箢 [yuan1] /used in 箢箕[yuan1 ji1] and 箢篼[yuan1 dou1]/Taiwan pr. [wan3]/ 
 +癔 癔 [[yi4]] /used in 癔病[yi4bing4] and 癔症[yi4zheng4]/ 
 +咐 咐 [[fu4]] /used in 吩咐[fen1fu5] and 囑咐|嘱咐[zhu3fu5]/ 
 +</code> 
 + 
 +An example of both 
 + 
 +<code> 
 +螂 螂 [[lang2]] /used in 螞螂|蚂螂[ma1lang2]/used in 蜣螂[qiang1lang2] and 虼螂[ge4lang2]/used in 螳螂[tang2lang2]/used in 蟑螂[zhang1lang2]/ 
 +</code> 
  
-  * The English definitions should be separated with the '/' character (e.g. /English equivalent 1/equivalent 2/). 
-  * American English should be used for the English definitions 
-  * Do not add definite or indefinite articles (e.g. "a", "an", "the", etc) to English nouns unless they are necessary to distinguish the word from another usage type or homonym 
  
 ===== Punctuation ===== ===== Punctuation =====
Line 117: Line 272:
 //Please note: words ending with 'r5' (such as 'hua1 r5') are presented as a -r joined with the previous syllable (eg. 'huar1') in some dictionaries using CC-CEDICT, such as the [[http://www.mdbg.net/chindict/chindict.php|MDBG Chinese-English dictionary]].// //Please note: words ending with 'r5' (such as 'hua1 r5') are presented as a -r joined with the previous syllable (eg. 'huar1') in some dictionaries using CC-CEDICT, such as the [[http://www.mdbg.net/chindict/chindict.php|MDBG Chinese-English dictionary]].//
  
-===== Taiwanese pronunciation ===== 
- 
-CC-CEDICT follows "standard Mandarin" as used in P.R.China. Mandarin as used in Taiwan sometimes has slight variations in the pronunciation, these can be listed as follows:\\  
-叔叔 叔叔 [shu1 shu5] /(informal) father's younger brother/uncle/Taiwan pr. shu2 shu5/ 
- 
-Taiwanese GuoYu sometimes prefers not to use the neutral tone, so we do not list Taiwan pronunciations when they consist only of saying "don't use the neutral tone". When a character has a "Taiwan pr." notice, then all of its compound need not mention it.   
- 
- 
-===== General principles ===== 
- 
-Various trivial style things: 
-  * Don't use parts of speech. Instead try to give an indication of grammatical usage within the English definition. CC-CEDICT is a human readable descriptive dictionary, not a resource intended for machine processing. 
-  * Abbreviations etc cf e.g. i.e. do not need any further punctuation. 
-  * Extended meanings indicated by lit. .. fig. combination when appropriate or when a common expression refers back to a classical incident or chengyu, one can refer to it with cf (incident in Records of the Historian). 
  
 ===== Choice of entries and translations ===== ===== Choice of entries and translations =====
Line 156: Line 297:
  
 There are 20,000 Chinese characters in the more advanced dictionaries, of which many are obscure, never used, and will not have correct definitions in online or paper dictionaries. This is the boundary of knowledge. (Exactly the same applies to big English dictionaries.) These obscure characters appear on modern websites, and one sometimes needs to give a definition. It is reasonable to admit (precise meaning unknown), and give an indication of what one can deduce. There are 20,000 Chinese characters in the more advanced dictionaries, of which many are obscure, never used, and will not have correct definitions in online or paper dictionaries. This is the boundary of knowledge. (Exactly the same applies to big English dictionaries.) These obscure characters appear on modern websites, and one sometimes needs to give a definition. It is reasonable to admit (precise meaning unknown), and give an indication of what one can deduce.
- 
-===== Ambiguity due to homonyms ===== 
- 
-Sometimes words used in the English definitions can have multiple meanings. If the Chinese word does not have these additional meanings, additional information should be provided to prevent ambiguity:\\  
-首都 首都 [shou3 du1] /capital (city)/ 
- 
-The text between the parentheses is "meta-information"; it is not a direct part of the translation, merely to prevent ambiguity.  
- 
-===== References ===== 
- 
-The English definitions can contain references to other Chinese words. These should be noted as follows:\\  
-漢字|汉字[Han4 zi4] 
- 
-For example:\\  
-股指 股指 [gu3 zhi3] /stock market index/share price index/abbr. for 股票指數|股票指数[gu3 piao4 zhi3 shu4]/ 
- 
-===== Classifiers ===== 
- 
-Classifiers (also called "Measure words") can be listed using the following syntax:\\  
-避風港 避风港 [bi4 feng1 gang3] /haven/refuge/harbor/CL:座[zuo4],個|个[ge4]/ 
- 
-Classifiers follow the 'reference' syntax, are prefixed by 'CL:' and separated by a comma (no additional spacing). 
- 
-The classifier words itself can be described using:\\  
-/classifier for small round things (peas, bullets, peanuts, pills, grains etc)/ 
  
 ===== Variants ===== ===== Variants =====
Line 198: Line 314:
  
 When there are alternative forms of the same expression, and the less common form is at most 5 times less common, the less common entry should have /also written ../ referring to the more common form, e.g. 撐竿跳高 撑竿跳高 [cheng1 gan1 tiao4 gao1] /pole-vaulting/also written 撐杆跳高|撑杆跳高/. When there are alternative forms of the same expression, and the less common form is at most 5 times less common, the less common entry should have /also written ../ referring to the more common form, e.g. 撐竿跳高 撑竿跳高 [cheng1 gan1 tiao4 gao1] /pole-vaulting/also written 撐杆跳高|撑杆跳高/.
 +
 +
 +**PROPOSED CHANGES**
 +
 +(Summary: (1) Get rid of "also written", using "variant of" instead; and (2) Format "variant of" entries in line with points 2a and 2b below.)
 + 
 +(THE VARIANT RULES ABOVE CAN BE DELETED IF AND WHEN THESE CHANGES ARE ACCEPTED.)
 +
 +(Also, the following notes can be tidied up and edited to remove references to "I" and "me".)
 +
 +Regarding "also written..."
 +
 +According to our wiki, there are two kinds of variants.
 +https://cc-cedict.org/wiki/format:syntax#variants
 +
 +1) Where the less common form is relatively common (> 20% of the frequency of the more common form).
 +
 +2) Where the less common form is much less common (< 20% of the frequency of the more common form)
 +
 +For the first type, the def of the less common form should look like this (according to the wiki):
 +<code>/definition/also written .../</code>
 +
 +And for the second type, the def of the less common form should be
 +<code>/variant of .../definition/</code>
 +
 +In practice, what has been happening in recent years is this:
 +
 +1. We have been ignoring the "also written ..." syntax, except maybe when we edit existing entries
 +
 +2. With variants,
 +
 +a) if it's a full variant (i.e. exactly the same definition), we use /variant of .../ without adding the definition.
 +
 +b) if it's a partial variant (i.e. only some of the senses of one form apply to the other form) we use
 +<code>/definition (variant of ...)/</code>
 +
 +Part of the rationale for these changes is this: It's a hassle to check whether entries satisfy the "20% criteria", and the percentage probably changes over time, and depending on which corpus you use to get the percentage.
 +
 +Using the Editor website's search function, I got about 3600 results for "variant of" and only about 360 results for "also written".  
 +
 +One idea that I've had in mind for a while is to clean up all these by
 +
 +a) rewriting "also written" definitions by using "variant of"
 +
 +b) regularizing the format of the "variant of" entries in line with points 2a and 2b above.
 +
 +
  
 ===== Romanization of foreign languages ===== ===== Romanization of foreign languages =====
format/syntax_v2.1722830798.txt.gz · Last modified: 2024/08/05 04:06 by richwarm

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki