From 2fb5bf36355c1607a1c96c04d120e15015b4908d Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 10 May 2011 23:47:02 +0200 Subject: expanded lookup table --- .../third/transliterator/transliterator.tex | 18 ++++++++++++++++ tex/context/interface/third/t-transliterator.xml | 8 +++++++ .../third/transliterator/trans_tables_sr.lua | 25 +++++++++++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/doc/context/third/transliterator/transliterator.tex b/doc/context/third/transliterator/transliterator.tex index b11cb3b..2f17dfa 100644 --- a/doc/context/third/transliterator/transliterator.tex +++ b/doc/context/third/transliterator/transliterator.tex @@ -376,6 +376,24 @@ Thus, we would typeset one of Epicuros' sayings like this: Alternatively there is an environment, \type{\starttransliterate[#1]}, as well, that takes the same arguments. +There are two special switches for the {\em Serbian} patterns, +\type{hinting} and \type{sr_exceptions}, allowing for a little +more fine-tuning. +If activated, hinting provides the special character “\type{*}” as +a means to indicate positions, where the sequences “lj” and “nj” +are to be treated as separate consonants. +E.~g. \type{\transliterate[mode=sr_tocy]{in*jekcija}} is +correctly transliterated as \transliterate[mode=sr_tocy]{in*jekcija}, +and not \transliterate[mode=sr_tocy,sr_exceptions=no]{injekcija}. +Likewise, further exceptions that are internally represented as +a lookup table can be toggled off or on by the +\type{sr_exceptions} switch. +This pertains to words like “nadživeti” (result: \transliterate[mode=sr_tocy]{nadživeti}) +but may lead to accidental false positives in cases that the +module author didn’t foresee. +By default both hinting and lexical exceptions are set to +\type{yes}. + For orientation purposes the Transliterator comes with two macros that allow for closer inspection of the internal tables. \type{\showOneTranslitTab{#1}} outputs, obviously, a single table; their diff --git a/tex/context/interface/third/t-transliterator.xml b/tex/context/interface/third/t-transliterator.xml index f80c48e..db62f09 100644 --- a/tex/context/interface/third/t-transliterator.xml +++ b/tex/context/interface/third/t-transliterator.xml @@ -32,6 +32,14 @@ + + + + + + + + diff --git a/tex/context/third/transliterator/trans_tables_sr.lua b/tex/context/third/transliterator/trans_tables_sr.lua index 5163035..f3b9218 100644 --- a/tex/context/third/transliterator/trans_tables_sr.lua +++ b/tex/context/third/transliterator/trans_tables_sr.lua @@ -94,9 +94,32 @@ if not translit.done_serbian then --- Good reading up front: --- + --- local except = { - ["nadživ"] = "надћив", -- nadživeti and derivatives + ["konjug"] = "конјуг", + ["konjunk"] = "конјунк", + ["injekc"] = "инјекц", + ["injunkt"] = "инјункт", + ["panjelin"] = "панјелин", + ["tanjug"] = "танјуг", + ["vanjezič"] = "ванјезич", + ["vanjadransk"] = "ванјадранск", + + ["nadžanj"] = "наджањ", + ["nadždrel"] = "надждрел", + ["nadžet"] = "наджет", + ["nadživ"] = "наджив", + ["nadžnj"] = "наджњ", + ["nadžup"] = "наджуп", + ["odžal"] = "оджал", + ["odžar"] = "оджар", + ["odživ"] = "оджив", + ["odžubor"] = "оджубор", + ["odžur"] = "оджур", + ["odžvak"] = "оджвак", + ["podžanr"] = "поджанр", + ["podže"] = "подже", -- “поджећи” } local P = lpeg.P -- cgit v1.2.3