Jump to content

Wiktionary:Parsing:Translations

From Wiktionary, the free dictionary

Basic EBNF grammar

[edit]

translation-section   = entry , { entry } ;

entry                 = language-name , ":" , translations | translation-request ;

language-name         = plain-language-name | linked-language-name | special-language-name ;

plain-language-name   = letter-string ;

linked-language-name  = start-link , plain-language-name , end-link ;

special-language-name = start-ttbc , plain-language-name , end-ttbc ;

translations          = translation , { "," | ";" , translation } ;

translation-request   = start-trreq , plain-language-name , end-trreq ;

translation           = term , [ inline-interwiki ] , [ transliteration ] , [ gender ] ;

term                  = plain-term | linked-term ;

plain-term            = letter-string ;

linked-term           = start-link , plain-term , end-link ;

inline-interwiki      = start-sup , "(" , language-code , ")" , end-sup ;

transliteration       = "(" , letter-string , ")" ;

gender                = "m" | "f" | "n" | "c" , [ "." ] ;

letter-string         = letter , { letter } ;

letter                = all letters in all scripts including han characters but excluding most punctuation

start-link
 (wikitext)           = "[[" ;
 (HTML/DOM)           = <a> ;

end-link
 (wikitext)           = "]]" ;
 (HTML/DOM)           = </a> ;

start-ttbc
 (wikitext)           = "{{ttbc|" ;
 (HTML/DOM)           = <span class="ttbc"> ;

end-ttbc
 (wikitext)           = "}}" ;
 (HTML/DOM)           = </span> ;

start-trreq
 (wikitext)           = "{{trreq|" ;
 (HTML/DOM)           = <span class="trreq"> ;

end-trreq
 (wikitext)           = "}}" ;
 (HTML/DOM)           = </span> ;

start-sup
 (HTML/DOM)           = <sup> ;

end-sup
 (HTML/DOM)           = </sup> ;