Template:cmn new

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

The following documentation is located at Template:cmn new/documentation. [edit]


This template automatically generates the content for a new Chinese entry. To use it:

{{subst:cmn new|$1|$2|$3|$4|$5|$6|$7|$8|$9|$10|$11|$12|$13|$14|$15|$16|$17|$18|$19|$20|$21|$22|$23}}
  • $1 - $5: entry title decomposed into individual characters; leave excessive parameters empty if length < 5
  • $6 - $10 (optional): corresponding trad. or simp. title decomposed, if exists; leave excessive parameters empty if length < 5
  • $11 (optional): t or s; empty implies ts
  • $12: part of speech, eg. n, v, a, adv
  • $13 - $17: pinyin of title decomposed by character; leave excessive parameters empty if length < 5
  • $18: sort key, eg. 人00
  • $19: definition; eg. [[bear]]
  • $20 (optional): a second part of speech, eg. a, n, v
  • $21 (optional): a second definition, eg. [[bear]]-like
  • $22 (optional): a third part of speech, eg. v, a, n
  • $23 (optional): a third definition, eg. to [[eat]] like a [[bear]]
  • wp= (optional): if =y, then link to zh.wp with the same title is added
  • type= (optional): for words with length > 2, available options: 12, 21, 22
  • e1=, e2= (optional): for compound etymology using {{zh-compound}}, e1 and e2 refer to the definitions of the first and second parts of the compound
  • c1=, c2= (optional): for compound etymology, these define the first and second parts of the compound. If undefined, they are automatically equal to the first and second characters.
  • etym= (optional): word etymology. If e1= also exists, then this is placed after {{zh-compound}} defined by e1= & e2=.
  • ko= (optional): Korean hanja word
  • kot= (optional): RR transcription of Korean word
  • koe= (optional): definition of Korean word, if undefined then =$19
  • kop= (optional): part of speech of Korean word, if undefined then =noun, option: adv
  • vi= (optional): Vietnamese han tu word
  • vie= (optional): definition of Vietnamese word, if undefined then =$19
  • l= (optional): difficulty level, options: b(beginner), i(intermediate), a(advanced)

Substitution only.

This template relies on {{py-to-ipa}} to generate the IPA-notated pronunciation in Beijing Mandarin.

Further developments[edit]

  • Automatically determine simp. or trad. by attempting to identify any simplifiable characters in the decomposed title. Done.
  • Automate simp-trad conversion by creating a conversion list, and allowing substituters to bypass automatic conversion if necessary as one-to-multiple correspondences also exist. Done.
  • Generate a list for the most common characters. Use string templates to automatically decompose title into single characters. Done.
  • Shorten {{zh-sortkeys}} to only include the most common characters, so that substituter does not need to look it up individually. Done.
  • Generate a list of the most common pinyin for these characters, assuming this is the pronunciation of the character in the new word; of course, this is while allowing substituter to define pronunciation if necessary. (Nearly done)

-> Ideal outcome (at 國語):

{{subst:cmn new|n|[[national language]]|wp=y}}

These have largely been actualised - the derivative which enables a simpler substitution being: {{cmn new/auto}} ({{cmn new/a}} redirects there)

{{subst:cmn new/a|p1=|p2=|PoS|defn}}