Vikivortaro eowiktionary https://eo.wiktionary.org/wiki/Vikivortaro:%C4%88efpa%C4%9Do MediaWiki 1.47.0-wmf.18 case-sensitive Aŭdvidaĵo Specialaĵo Diskuto Uzanto Uzanta diskuto Vikivortaro Vikivortaro-Diskuto Dosiero Dosiero-Diskuto MediaWiki MediaWiki-Diskuto Ŝablono Ŝablono-Diskuto Helpo Helpo-Diskuto Kategorio Kategorio-Diskuto Aldono Aldono-Diskuto TimedText TimedText talk Modulo Modulo-Diskuto Event Event talk salamander 0 20981 1475772 1030059 2026-09-06T13:34:01Z Taylor 49 4683 == angla == === Substantivo === {{livs|en|SB|fra=$B}} {{tf-en-sb}} ===={{Signifoj}}==== # {{k|en|F: amfibio}} [[salamandro]]; ordo "Caudata" aŭ "Urodela" {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} 1475772 wikitext text/x-wiki == angla == === Substantivo === {{livs|en|SB|fra=$B}} {{tf-en-sb}} ===={{Signifoj}}==== # {{k|en|F: amfibio}} [[salamandro]]; ordo "Caudata" aŭ "Urodela" {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} g2jjzgffxrvn1y8v1yxbvfgnkuca9tg 1475776 1475772 2026-09-06T13:38:46Z Taylor 49 4683 +sv 1475776 wikitext text/x-wiki == angla == === Substantivo === {{livs|en|SB|fra=$B}} {{tf-en-sb}} ===={{Signifoj}}==== # {{k|en|F: amfibio}} [[salamandro]]; ordo "Caudata" aŭ "Urodela" {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} == sveda == === Substantivo === {{livs|sv|SB|fra=$B}} ===={{Signifoj}}==== # {{k|sv|F: amfibio}} [[salamandro]]; ordo "Caudata" aŭ "Urodela" {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 14mca2zltw1i8rl40xtmbv5xn526kip flygplan 0 96104 1475762 1132276 2026-09-06T13:02:38Z Taylor 49 4683 1475762 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=$B}} * (ett) flygplan, flygplanet ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[aviadilo]] #: {{vian|[[zeppelinare]], [[raket]], [[svävare]]}} {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 0rrk98zqe4ykm487dtxv7a8ukt6ck9r 1475767 1475762 2026-09-06T13:13:36Z Taylor 49 4683 z 1475767 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=[M:flyg]+[M:plan]}} * (ett) flygplan, flygplanet ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[aviadilo]] #: {{rima|Iomete nelogika kunmetitaĵo, laŭvorte "flugebeno", kvankam flugiloj nepre ne estu ebenaj por ke ili funkciu, kaj pliaj gravaj partoj aldoniĝu al la flugiloj por ke la objekto povu flugi.}} #: {{vian|[[zeppelinare]], [[raket]], [[svävare]]}} {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} dksf08nq7o2f6imkebwatg4i4lgvdzx 1475768 1475767 2026-09-06T13:15:17Z Taylor 49 4683 q 1475768 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=[M:flyg]+[M:plan]}} * (ett) flygplan, flygplanet ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[aviadilo]] #: {{rima|Iomete nelogika kunmetitaĵo, laŭvorte "flugebeno", kvankam flugiloj nepre ne estu ebenaj por ke ili funkciu, kaj pliaj gravaj partoj aldoniĝu al la flugiloj por ke la objekto povu flugi.}} #: {{vian|[[flygande tefat]], [[fågel]], [[helikopter]], [[luftskepp]], [[raket]], [[svävare]], [[ufo]] ([[UFO]], [[zeppelinare]]}} {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 7vvseon8oqof9yfs6dq8cfvj6igf5qg 1475769 1475768 2026-09-06T13:15:44Z Taylor 49 4683 #: {{vian|[[flygande tefat]], [[fågel]], [[helikopter]], [[luftskepp]], [[raket]], [[svävare]], [[ufo]] ([[UFO]]), [[zeppelinare]]}}#: {{vian|[[flygande tefat]], [[fågel]], [[helikopter]], [[luftskepp]], [[raket]], [[svävare]], [[ufo]] ([[UFO]]), [[zeppelinare]]}} 1475769 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=[M:flyg]+[M:plan]}} * (ett) flygplan, flygplanet ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[aviadilo]] #: {{rima|Iomete nelogika kunmetitaĵo, laŭvorte "flugebeno", kvankam flugiloj nepre ne estu ebenaj por ke ili funkciu, kaj pliaj gravaj partoj aldoniĝu al la flugiloj por ke la objekto povu flugi.}} #: {{vian|[[flygande tefat]], [[fågel]], [[helikopter]], [[luftskepp]], [[raket]], [[svävare]], [[ufo]] ([[UFO]]), [[zeppelinare]]}} {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} dc7ii71fyb6xeezrrg7j3upz2kintrq flygplats 0 117094 1475765 1148433 2026-09-06T13:06:39Z Taylor 49 4683 == sveda == === Substantivo === {{livs|sv|SB|fra=[M:flyg]+[M:plats]}} * (en) flygplats, flygplatsen ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[flughaveno]] #: {{vian|[[hållplats]], [[hamn]], [[station]]}} {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 1475765 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=[M:flyg]+[M:plats]}} * (en) flygplats, flygplatsen ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[flughaveno]] #: {{vian|[[hållplats]], [[hamn]], [[station]]}} {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} eo1fhftekdytfbr7ckysqex3f5bnibk hangarfartyg 0 127379 1475763 1148629 2026-09-06T13:03:17Z Taylor 49 4683 # {{k|sv|F: militado|aviado}} [[aviadila ŝipo]] 1475763 wikitext text/x-wiki =={{Lingvo|sv}}== ==={{Vortospeco|substantivo|sv}}=== ===={{Signifoj}}==== # {{k|sv|F: militado|aviado}} [[aviadila ŝipo]] {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 0qnz36vqxevoocbidftkogudxp7qtp4 Modulo:msplitter 828 127994 1475760 1220559 2026-09-06T12:51:58Z Taylor 49 4683 plimo 1475760 Scribunto text/plain --[===[ MODULE "MSPLITTER" "eo.wiktionary.org/wiki/Modulo:msplitter" <!--2026-Sep-05--> "id.wiktionary.org/wiki/Modul:msplitter" Purpose: submodule for "mlawc" Utilo: submodulo por "mlawc" Manfaat: submodul untuk "mlawc" Syfte: submodul foer "mlawc" Used by templates / Uzata far sxablonoj / Digunakan oleh templat / Anvaend av mallar: * none (this module cannot be called from a template) Required submodules / Bezonataj submoduloj / Submodul yang diperlukan / Behoevda submoduler: none Incoming: * single table with following content (everything must be prevalidated by the caller): * 0 (boo) -- desirability of compound cat:s * 1 (str) -- pagename AKA input lemma (may NOT be empty) * 2 (num) -- split strategy (0...5 or 7) * 3 (tab) -- fragments from "%"-syntax assi * 4 (tab) -- fragments from "#"-syntax assi * 5 (tab) -- fragments for manual split * 6 (tab) -- fragments from extra parameter * 7 (boo) -- true if extra parameter was used * 8 (tab) -- lang stuff with double-letter indexes * 9 (boo) -- NR word class * 10 (boo) -- KA word class * 15 (boo) -- detrc= * desirability of compound cat:s -- index 0 (we split even if false but no cat:s then) * lemma (may NOT be empty) -- index 1 - split control parameter -- index 2 3 4 5 - extra parameter -- index 6 7 - language stuff (code and some variants of language name) -- index 8 - word class (reduced to 2 questions) -- index 9 10 Returned: * single table with following content: * 0...17 (str) category names * 20...37 (nil or boo) main page flags * 50 (str) output lemma wikitext or "//" on error * 51 (str) debug "qstrtrace" * 52 (num) status code (ZERO is OK) The split strategies available are: * #S0 automatic multiword split * #S1 assisted split * #S2 manual split * #S3 simple root split * #S4 simple bare root * #S5 large letter split * #S6 reserved * #S7 no split (splitter still may be called and extra parameter is processed) List of 6+1+1+1 selectable morpheme types: C circumfix cirkumfikso I infix infikso (EO: -o- -et- -il- ...) M standalone root memstara radiko (EO: tri dek post ...) N nonstandalone root nememstara radiko (EO: fer voj ...) P prefix prefikso U suffix sufikso (postfikso, finajxo, EO: -a -j -n) ------- W word vorto ------- L same as "N" but changes linking behavior (only in F210) ------- X only after "&" in the extra parameter (caller converts it for us) These mortyp:s can be used in the split control parameter before colon ":" with manual split, and in the extra parameter, but then "L" is prohibited (thus C I M N P U W are left plus maybe X), either after "&", or in fragments before ":" or "!" (see "spec-splitter-en.txt" for syntax details). We put only the letter symbol into the category name (except for the type word) as it otherwise would become unreasonably long. It must contain 3 pieces of information: * language (consider "-an" in SV and ID) * mortyp (consider "-an" and "an-" and "an" in SV) * the morpheme / affix / word itself It is possible to deactivate (semi-hardcoded configuration in the source code of "mlawc") only compound categories, or the splitter resulting in the raw lemma showed without link, or deactivate showing the lemma altogether, in both latter cases the splitter is inactive and this module is not called at all. The automatic splitter ("numsplyt" = 0 and "lfhsplitaa") is fully automatic and the 2 tables at index 3 and 4 must be empty then. No error can occur here, but there is risk for a failure that no split boundaries can be applied, and the output is identical to the input. The assisted splitter ("numsplyt" = 1 and "lfhsplitaa") is controlled by 2 prevalidated tables. * Table contains up to 16 values indexed by integers 0 to 15, value type string "1" means do block, type "nil" means do not block (the default). Other values should not occur and evaluate to do not block like "nil" does. * Table contains up to 16 values indexed by integers 0 to 15, value: * type string: * "N" or "I" or "A" (as described in "spec-splitter-en.txt") * colon ":" followed by the link target (length 1...40 octet:s NOT checked anymore here) Beginning char other than "N" or "I" or "A" or ":" should not occur and evaluates to do nothing unusual like "nil" does. * type "nil" means do nothing unusual (the default) No error can occur in the assisted splitter, but there is risk for a failure that no split boundaries can be applied, and the output is identical to the input. The manual splitter ("numsplyt" = 2 and "lfhsplitmn") is controlled by one prevalidated table, the pagename does not even enter the split process, but a bool revealing whether it contains at least one space does. * Table contains 1 to 16 strings indexed by integers 0 to 15, one string for every fragment. The 5 legal types are: * F000 : no brackets, no colon, no slash (visible text no link) * F200 : 2 brackets, no colon, no slash (combo target visible text) * F201 : 2 brackets, no colon, 1 slash (target / visible text) * F210 : 2 brackets, 1 colon, no slash (mortyp : combo target visible text) * F211 : 2 brackets, 1 colon, 1 slash (mortyp : target / visible text) No error can occur in the manual splitter and no failure due to lack of boundaries either, the "sum check" is part of the prevalidation. Note that we use slashes and single rectangular brackets "+[I:bug/BUG]" instead of wikisyntax "[[bug|BUG]]", beware that "[bug|BUG]" would NOT work. ]===] local exporttable = {} require('strict') -- *********************** -- * CONSTANTS [O] * --------------------------------------------- -- *********************** -- uncommentable EO vs ID constant table (categories) -- syntax of placeholder: -- "@" followed by 2 uppercase letters and 2 hex numbers -- otherwise the hit is not processed, but copied as-is instead -- 2 letters select the insertable item from table supplied by the caller -- 2 hex digits control dropping left and right (0...15 char:s) -- if uppercasing or other adjustment is needed then the caller must take -- care of it in the form of 2 or more separate items provided in the table -- insertable items defined: -- constant: -- * LK langcode (unknown "??" legal but take care elsewhere) -- * LN langname (unknown legal, for example "dana" or "Ido") -- * LU langname uppercased (unknown legal, for example "Dana" or "Ido") -- * LO langname not own (empty or nil if own) -- * LV langname uppercased not own (empty or nil if own) -- * LY langname long (for example "bahasa Swedia") -- * LZ langname long not own (empty or nil if own) -- * SC script code (for example "T", "S", "P" for ZH, "C" "L" for SH) -- variable (we can have 2 word classes): -- * WC word class name (for example "substantivo") -- * WU word class name uppercased (for example "Substantivo") -- * MT mortyp code (for example "C") -- * FR fragment (for example "peN-...-an" or "abelujo") -- see "pripl5navare" and "tablngdbl" use space here and avoid "_" -- note the malicious false friendship between EO:frazo kaj ID:frasa local contabktaoj = {} contabktaoj[3] = 'Vortgrupo -@LK00- enhavanta (@FR00) @SC10' -- EO only if ("boocatdesir" is true) can be many -- contabktaoj[3] = 'Frasa @LZ10 mengandung kata @FR00 @SC10' -- ID only if ("boocatdesir" is true) can be many contabktaoj[4] = 'Frazo -@LK00- enhavanta vorton (@FR00) @SC10' -- EO only if ("boocatdesir" is true) can be many -- contabktaoj[4] = 'Kalimat @LK00 mengandung kata (@FR00) @SC10' -- ID only if ("boocatdesir" is true) can be many contabktaoj[5] = 'Vorto -@LK00- enhavanta morfemon @MT00 (@FR00) @SC10' -- EO only if ("boocatdesir" is true) can be many -- contabktaoj[5] = 'Kata @LK00 mengandung morfem @MT00 (@FR00) @SC10' -- ID only if ("boocatdesir" is true) can be many -- **************************************** -- * SPECIAL STUFF OUTSIDE MAIN [B] * ---------------------------- -- **************************************** -- SPECIAL VAR:S local qboodetrc = true local qstrtrace = '<br>' -- for main & proc, debug report sent to parent local qtabktaoj = {} -- global for compound categories [0]...[52] and ret -- ****************************** -- * DEBUG PROCEDURES [D] * -------------------------------------- -- ****************************** -- Enhance upvalue "qstrtrace" with fixed text. -- for variables other "lfdshowvar" is preferable but in exceptional -- cases it can be justified to send text with values of variables to this one -- no size limit -- upvalue "qstrtrace" must NOT be type "nil" on entry (is inited to "<br>") -- uses upvalue "qboodetrc" local function prdtracemsg (strshortline) if (qboodetrc and (type(strshortline)=='string')) then qstrtrace = qstrtrace .. strshortline .. '.<br>' -- dot added !!! end--if end--function prdtracemsg -- ***************************** -- * MATH PROCEDURES [E] * --------------------------------------- -- ***************************** local function mathdiv (xdividens, xdivisero) local resultdiv = 0 -- DIV operator lacks in LUA :-( resultdiv = math.floor (xdividens / xdivisero) return resultdiv end--function mathdiv local function mathmod (xdividendo, xdivisoro) local resultmod = 0 -- MOD operator is "%" and bitwise AND operator lack too resultmod = xdividendo % xdivisoro return resultmod end--function mathmod ------------------------------------------------------------------------ -- Check single bit selected by ZERO-based index. !!!FIXME!!! delete soon local function mathbittest (numincoming, numbitindex) local boores = false while true do if ((numbitindex==0) or (numincoming==0)) then break -- we have either reached our bit or run out of bits end--if numincoming = mathdiv(numincoming,2) -- shift right numbitindex = numbitindex - 1 -- count down to ZERO end--while boores = (mathmod(numincoming,2)==1) -- pick bit return boores end--function mathbittest -- ****************************************** -- * NUMBER CONVERSION PROCEDURES [N] * -------------------------- -- ****************************************** local function prnonehextoint (numdigit) -- Convert single quasi-digit (ASCII HEX "0"..."9" "A"..."F") -- to integer (0...15, 255 invalid). -- Only uppercase accepted. local numresult = 255 if ((numdigit>=48) and (numdigit<=57)) then -- "0"..."9" numresult = numdigit-48 end--if if ((numdigit>=65) and (numdigit<=70)) then -- "A"..."F" numresult = numdigit-55 end--if return numresult end--function prnonehextoint -- ***************************************** -- * LOW LEVEL STRING PROCEDURES [G] * --------------------------- -- ***************************************** local function prgtestuc (numkode) local booupperc = false booupperc = ((numkode>=65) and (numkode<=90)) return booupperc end--function prgtestuc local function prgtestlc (numcode) local boolowerc = false boolowerc = ((numcode>=97) and (numcode<=122)) return boolowerc end--function prgtestlc ------------------------------------------------------------------------ local function prgstringrange (varvictim, nummini, nummaxi) local nummylengthofstr = 0 local booveryvalid = false -- preASSume guilt if (type(varvictim)=='string') then nummylengthofstr = string.len(varvictim) booveryvalid = ((nummylengthofstr>=nummini) and (nummylengthofstr<=nummaxi)) end--if return booveryvalid end--function prgstringrange ------------------------------------------------------------------------ local function prgpokestring (strinpokeout, numpokepoz, numpokeval) -- Replace single octet in a string. -- Input : * strinpokeout -- empty legal, but nothing done then -- * numpokepoz -- ZERO-based, out of range legal -- * numpokeval -- new UINT8 value -- This is inefficient by design of LUA. The caller is responsible to -- minimize the number of invocations of this, in particular, not to -- call if the new value is equal the existing one. local numpokelen = 0 numpokelen = string.len(strinpokeout) if ((numpokelen==1) and (numpokepoz==0)) then strinpokeout = string.char(numpokeval) -- totally replace end--if if (numpokelen>=2) then if (numpokepoz==0) then strinpokeout = string.char(numpokeval) .. string.sub(strinpokeout,2,numpokelen) end--if if ((numpokepoz>0) and (numpokepoz<(numpokelen-1))) then strinpokeout = string.sub(strinpokeout,1,numpokepoz) .. string.char(numpokeval) .. string.sub(strinpokeout,(numpokepoz+2),numpokelen) end--if if (numpokepoz==(numpokelen-1)) then strinpokeout = string.sub(strinpokeout,1,numpokepoz) .. string.char(numpokeval) end--if end--if (numpokelen>=2) then return strinpokeout end--function prgpokestring ------------------------------------------------------------------------ local function prgtestpuncture (numcorde) -- Test whether char is an ASCII punctuation sign, return type "boolean". -- punctuation (5 char:s: ! , . ; ?) 21 33 | 2C 44 | 2E 46 | 3B 59 | 3F 63 -- dash "-" and apo "'" do NOT count as punctuation -- here we do NOT include SPACE in the list local boopunk = false boopunk = ((numcorde==33) or (numcorde==44) or (numcorde==46) or (numcorde==59) or (numcorde==63)) return boopunk end--function prgtestpuncture -- ****************************************** -- * HIGH LEVEL STRING PROCEDURES [I] * -------------------------- -- ****************************************** local function lfiaddthedash (strafikso, booaddleft, booaddright) local numdashlength = 0 local numbuggar = 0 numdashlength = string.len (strafikso) if (numdashlength~=0) then numbuggar = string.byte (strafikso,1,1) if (numbuggar==45) then booaddleft = false -- avoid "--"... end--if numbuggar = string.byte (strafikso,numdashlength,numdashlength) if (numbuggar==45) then booaddright = false -- avoid ..."--" end--if if (booaddleft) then strafikso = '-' .. strafikso end--if if (booaddright) then strafikso = strafikso .. '-' end--if end--if return strafikso end--function lfiaddthedash ------------------------------------------------------------------------ local function lfidebracket (strde31br, boooutside, numxminlencz) -- Separate bracketed part of a string and return the inner or outer -- part. On failure the string is returned complete and unchanged. -- There must be exactly ONE "(" and exactly ONE ")" in correct order. -- Input : * strde31br, boooutside -- * numxminlencz -- minimal length of inner part, must be >= 1 !!! -- Note that for length of hit ZERO ie "()" we have "begg" + 1 = "endd" -- and for length of hit ONE ie "(x)" we have "begg" + 2 = "endd". -- Example: "crap (NO)" -> len = 9 -- 123456789 -- "begg" = 6 and "endd" = 9 -- Expected result: "NO" or "crap " (note the trailing space) -- Example: "(XX) YES" -> len = 8 -- 12345678 -- "begg" = 1 and "endd" = 4 -- Expected result: "XX" or " YES" (note the leading space) local numindoux = 1 -- ONE-based local numdlong = 0 local num31wesel = 0 local numbegg = 0 -- ONE-based, ZERO invalid local numendd = 0 -- ONE-based, ZERO invalid numdlong = string.len (strde31br) while true do if (numindoux>numdlong) then break -- ONE-based -- if both "numbegg" "numendd" non-ZERO then maybe end--if num31wesel = string.byte(strde31br,numindoux,numindoux) if (num31wesel==40) then -- "(" if (numbegg==0) then numbegg = numindoux -- pos of "(" else numbegg = 0 break -- damn: more than 1 "(" present end--if end--if if (num31wesel==41) then -- ")" if ((numendd==0) and (numbegg~=0) and ((numbegg+numxminlencz)<numindoux)) then numendd = numindoux -- pos of ")" else numendd = 0 break -- damn: more than 1 ")" present or ")" precedes "(" end--if end--if numindoux = numindoux + 1 end--while if ((numbegg~=0) and (numendd~=0)) then if (boooutside) then strde31br = string.sub(strde31br,1,(numbegg-1)) .. string.sub(strde31br,(numendd+1),numdlong) else strde31br = string.sub(strde31br,(numbegg+1),(numendd-1)) -- separate substring end--if end--if return strde31br -- same string variable end--function lfidebracket ------------------------------------------------------------------------ -- Local function LFIREMOVE2BRA local function lfiremove2bra (strinmedparenteser) local stroututanparenteser = '' local numindozux = 1 -- ONE-based local numparepanjang = 0 local numparechar = 0 numparepanjang = string.len (strinmedparenteser) while true do if (numindozux>numparepanjang) then break end--if numparechar = string.byte(strinmedparenteser,numindozux,numindozux) if ((numparechar~=40) and (numparechar~=41)) then stroututanparenteser = stroututanparenteser .. string.char(numparechar) end--if numindozux = numindozux + 1 end--while return stroututanparenteser end--function lfiremove2bra -- ***************************** -- * UTF8 PROCEDURES [U] * --------------------------------------- -- ***************************** local function prulnutf8char (numbgoctet) -- Evaluate length of a single UTF8 char in octet:s. -- Input : * numbgoctet -- beginning octet of a UTF8 char local numlen1234x = 0 if (numbgoctet<128) then numlen1234x = 1 -- $00...$7F end--if if ((numbgoctet>=194) and (numbgoctet<=223)) then numlen1234x = 2 -- $C2 to $DF end--if if ((numbgoctet>=224) and (numbgoctet<=239)) then numlen1234x = 3 -- $E0 to $EF end--if if ((numbgoctet>=240) and (numbgoctet<=244)) then numlen1234x = 4 -- $F0 to $F4 end--if return numlen1234x end--function prulnutf8char ------------------------------------------------------------------------ local function prusrcasepairfull (strmy5set, num16val5in) -- Search pair of undecoded UTF8 values (UPPER, lower) based on -- ONE value (based on data table). -- Input : * strmy5set -- "eo" or "sv" or "GENE" (no "ASCII" here) -- * num16val5in -- undecoded UINT16BE value, $C200 ... $DEFF -- Output : * num16upper, num16lower -- both -1 if nothing found -- This obeys UTF8UT.TXT . -- Depends on procedures : -- [E] mathmod -- Depends on constants : -- * tables "contabkejseo" "contabkejssv" "contabkejsgene" -- only -- partially checked, may be incomplete or absent, but MUST be valid -- Called from PRUCOMPAREUTF8WCI PRUTRISTULETR PRUCASEAIOREST PRUCASEAIOFULL -- PRUCOMPARECIBEGIN PRICASEADVJAEM2AL PRICASEADVJAEMFBAL PRICASEADVJAEM2FB. -- This is useful for UTF8-aware: -- * adjusting a single letter or text to UPPER or lower case -- * finding out whether a char is UPPER letter, lower letter, or non-letter -- * efficient case insensitive comparison (do NOT call this if at least -- one char is within the ASCII range, or two chars are equal even without -- case insensitivity) -- if (size of range) = 1 then !!!FIXME!!! this is in UTF8UT.TXT -- FYI: no range, only one straightforward way, check -- (two comparisons) whether the incoming value fits, delta -- enters the comparison, but it doesn't matter whether -- there is (delta = 1) or (delta = -1) or not -- else -- FYI: range -- if (delta = 1) or (delta = -1) then -- FYI: corresponding uppercase letter and lowercase -- letter are adjacent, one of two alignments, still -- range ALWAYS begins with uppercase -- FYI: size of the range is always odd, ie 1,3,5,... and -- there is an uppercase letter both at begin and at end -- * check (ONE comparison) whether the incoming value is -- in the range and at an even position (0,2,4,...) -- * if yes, take the original value as uppercase, take the -- original value ... local numtabin98dex = 1 -- ONE-based local numbeg98upin = 0 local numsi98ze = 0 local numdel98ta = 0 local numpluusdelta = 0 local numminusdelta = 0 local num16upper = -1 -- preASSume nothing found local num16lower = -1 -- preASSume nothing found local booselecteo = false local booselectsv = false local booselectgene = false booselecteo = (strmy5set=='eo') and (type(contabkejseo)=='table') booselectsv = (strmy5set=='sv') and (type(contabkejssv)=='table') booselectgene = (strmy5set=='GENE') and (type(contabkejsgene)=='table') while true do -- genuine loop over ONE table of many, index "numtabin98dex" numbeg98upin = 0 -- preASSume nothing, ZERO is INVALID if (booselecteo) then numbeg98upin = contabkejseo[numtabin98dex] numsi98ze = contabkejseo[numtabin98dex+1] -- 0...63 but 0 -> 64 numdel98ta = contabkejseo[numtabin98dex+2] -- -4'096...4'095 ZERO inva end--if if (booselectsv) then numbeg98upin = contabkejssv[numtabin98dex] numsi98ze = contabkejssv[numtabin98dex+1] numdel98ta = contabkejssv[numtabin98dex+2] end--if if (booselectgene) then numbeg98upin = contabkejsgene[numtabin98dex] numsi98ze = contabkejsgene[numtabin98dex+1] numdel98ta = contabkejsgene[numtabin98dex+2] end--if if ((numbeg98upin==0) or (type(numbeg98upin)~='number') or (type(numsi98ze)~='number') or (type(numdel98ta)~='number')) then break -- end reached and nothing found, or "strmy5set" not valid end--if numbeg98upin = numbeg98upin + 0xC000 -- only for 2-oct if (numsi98ze==0) then numsi98ze = 64 -- ZERO size is invalid end--if numpluusdelta = num16val5in + numdel98ta numminusdelta = num16val5in - numdel98ta if (numsi98ze==1) then -- single pair of letters if ((num16val5in==numbeg98upin) or (numminusdelta==numbeg98upin)) then num16upper = numbeg98upin num16lower = numbeg98upin + numdel98ta break -- found it end--if else if ((numdel98ta==1) or (numdel98ta==-1)) then -- alternating in range if ((num16val5in>=numbeg98upin) and (num16val5in<=(numbeg98upin+numsi98ze)) and (mathmod((num16val5in-numbeg98upin),2)==0)) then num16upper = num16val5in -- above use >= and <= inclu end !!! num16lower = numpluusdelta break -- found it end--if if ((numminusdelta>=numbeg98upin) and (numminusdelta<=(numbeg98upin+numsi98ze)) and (mathmod((numminusdelta-numbeg98upin),2)==0)) then num16upper = numminusdelta -- above use >= and <= inclu end !!! num16lower = num16val5in break -- found it end--if else if ((num16val5in>=numbeg98upin) and (num16val5in<(numbeg98upin+numsi98ze))) then num16upper = num16val5in -- above use >= and < !!! num16lower = numpluusdelta break -- found it end--if if ((numminusdelta>=numbeg98upin) and (numminusdelta<(numbeg98upin+numsi98ze))) then num16upper = numminusdelta -- above use >= and < !!! num16lower = num16val5in break -- found it end--if end--if ((numdel98ta==1) or (numdel98ta==-1)) else end--if (numsi98ze==1) else numtabin98dex = numtabin98dex + 3 end--while -- genuine loop return num16upper, num16lower end--function prusrcasepairfull ------------------------------------------------------------------------ local function prucaseaiofull (strinco7cs, booup7cas, boodo7all) -- !!!FIXME!!! this is old code -- 3->4 param -- Adjust case of a single letter or longer string within defined -- charset (ASCII + selectable bigger subset of UTF8). (this is FULL) -- Input : * strinco7cs : single unicode letter (1 or 2 octet:s) or -- longer string -- * booup7cas : for desired output uppercase "true" and for -- lowercase "false" -- * boodo7all : "true" to adjust all letters, "false" -- only beginning letter -- Output : * strinco7cs -- Depends on procedures : (this is FULL) -- [U] prulnutf8char -- [G] prgtestuc prgtestlc prgpokestring -- [E] mathdiv mathmod mathbittest -- This process never changes the length of a string in octet:s. Empty string -- on input is legal and results in an empty string returned. When case is -- adjusted, a 1-octet or 2-octet letter is replaced by another letter of same -- length. Unknown seemingly valid char:s (1-octet ... 4-octet) are copied. -- Broken UTF8 stream results in remaining part of the output string (from -- one char to complete length of the incoming string) filled by "Z". -- * lowercase is usually above uppercase, but not always, letters can be -- only misaligned (UC even vs UC odd), and rarely even swapped (French "Y") -- * case delta can be 1 or $20 or $50 other -- * case pair distance can span $40-boundary or even $0100-boundary -- * in the ASCII range lowercase is $20 above uppercase, b5 reveals -- the case (1 is lower) -- * the same is valid in $C3-block -- * this is NOT valid in $C4-$C5-block, lowercase is usually 1 above -- uppercase, but nothing reveals the case reliably -- ## $C4-$C5-block $0100 $C4,$80 ... $017F $C5,$BF (EO mm) -- delta 1 and UC even, but messy with many exceptions -- EO $0108 ... $016D case delta 1 -- for example SX upper $015C $C5,$9C -- lower $015D $C5,$9D -- $0138 $0149 $017F excluded (not letters) -- $0178 excluded (here UC, LC is $FF) -- $0100 ... $0137 UC even -- $0139 ... $0148 misaligned (UC odd) note that case delta is NOT reversed -- $014A ... $0177 UC even again -- $0179 ... $017E misaligned (UC odd) note that case delta is NOT reversed -- ## $CC-$CF-block $0300 $CC,$80 ... $03FF $CF,$BF (EL mm) delta $20 -- EL $0370 ... $03FF (officially) -- strict EL base range $0391 ... $03C9 case delta $20 -- $0391 $CE,$91 ... $03AB $CE,$AB upper -- $03B1 $CE,$B1 ... $03CB $CD,$8B lower -- for example "omega" upper $03A9 $CE,$A9 -- lower $03C9 $CF,$89 -- ## $D0-$D3-block $0400 $D0,$80 ... $04FF $D3,$BF (RU mm) -- * delta $20 $50 1 -- * strict RU base range $0410 ... $044F case delta $20 but there -- is 1 extra char outside !!! -- * $0410 $D0,$90 ... $042F $D0,$AF upper -- * $0430 $D0,$B0 ... $044F $D1,$8F lower -- * for example "CCCP-gamma" upper $0413 $D0,$93 -- lower $0433 $D0,$B3 -- * extra base char and exception is special "E" with horizontal doubledot -- case delta $50 (upper $0401 $D0,$81 -- lower $0451 $D1,$91) -- * same applies for ranges $0400 $D0,$80 ... $040F $D0,$8F upper -- and $0450 $D1,$90 ... $045F $D1,$9F lower -- * range $0460 $D1,$A0 ... $04FF $D3,$BF (ancient RU, UK, RUE, ...) case -- delta 1 and UC usually even, but messy with many exceptions $048x -- $04Cx (combining decorations and misaligned) -- Variables "numdel7abs" and "numdel7ta" must be at least 16-bit to avoid -- misevaluation or wrong wrapping when fitting into the range 128...191, -- even if no deltas exceeding +-127 are supported (there are very few pairs -- of char:s exceeding this). Also both can be declared unsigned since only -- addition and subtraction are performed on them. -- We peek max 2 values per iteration, and change the string in-place, doing -- so strictly only if there indeed is a change. This is important for LUA -- where the in-place write access must be emulated by means of a less -- efficient function. local numlong7den = 0 -- actual length of input string local numokt7index = 0 local numlong7bor = 0 -- expected length of single char local numdel7abs = 0 -- at least 16-bit, absolute posi delta local numdel7ta = 0 -- quasi-signed at least 16-bit, can be negative local numdel7car = 0 -- quasi-signed 8-bit, can be negative local numcha7r = 0 -- UINT8 beginning char local numcha7s = 0 -- UINT8 later char (BIG ENDIAN, lower value here above) local numcxa7rel = 0 -- UINT8 code relative to beginning of block $00...$FF local boowan7tlowr = false local boois7uppr = false local boois7lowr = false local boomy7bit0x = false -- single relevant bits picked -- b0 local boomy7bit5x = false -- single relevant bits picked -- b5 local boopen7din = false -- only fake loop local boodo7adj = true -- preASSume innocence -- continue changing local boobotch7d = false -- preASSume innocence -- NOT yet botched local booc3block = false -- $C3 only $00C0...$00FF SV mm delta 32 local booc4c5blk = false -- $C4 $C5 $0100...$017F EO mm delta 1 local boocccfblk = false -- $CC $CF $0300...$03FF EL mm delta 32 local bood0d3blk = false -- $D0 $D3 $0400...$04FF RU mm delta 32 80 booup7cas = (booup7cas==true) boodo7all = (boodo7all==true) boowan7tlowr = (not booup7cas) numlong7den = string.len (strinco7cs) while true do -- genuine loop over incoming string (this is FULL) if (numokt7index>=numlong7den) then break -- done complete string end--if if ((not boodo7all) and (numokt7index~=0)) then -- loop can skip index ONE boodo7adj = false end--if boois7uppr = false -- preASSume on every iteration boois7lowr = false -- preASSume on every iteration numdel7ta = 0 -- preASSume on every iteration numlong7bor = 1 -- preASSume on every iteration while true do -- fake loop (this is FULL) numcha7r = string.byte (strinco7cs,(numokt7index+1),(numokt7index+1)) if (boobotch7d) then numdel7ta = 90 - numcha7r -- "Z" -- delta must be non-ZERO to write break -- fill with "Z" char:s end--if if (not boodo7adj) then break -- copy octet after octet end--if numlong7bor = prulnutf8char(numcha7r) if ((numlong7bor==0) or ((numokt7index+numlong7bor)>numlong7den)) then numlong7bor = 1 -- reassign to ONE !!! numdel7ta = 90 - numcha7r -- "Z" -- delta must be non-ZERO to write boobotch7d = true break -- truncated char or broken stream end--if if (numlong7bor>=3) then break -- copy UTF8 char, no chance for adjustment end--if if (numlong7bor==1) then boois7uppr = prgtestuc(numcha7r) boois7lowr = prgtestlc(numcha7r) if (boois7uppr and boowan7tlowr) then numdel7ta = 32 -- ASCII UPPER->lower end--if if (boois7lowr and booup7cas) then numdel7ta = -32 -- ASCII lower->UPPER end--if break -- success with ASCII and one char almost done end--if booc3block = (numcha7r==195) -- case delta is 32 booc4c5blk = ((numcha7r==196) or (numcha7r==197)) -- case delta is 1 boocccfblk = ((numcha7r>=204) and (numcha7r<=207)) -- case delta is 32 bood0d3blk = ((numcha7r>=208) and (numcha7r<=211)) -- case delta is 32 80 1 numcha7s = string.byte (strinco7cs,(numokt7index+2),(numokt7index+2)) -- only $80 to $BF numcxa7rel = (mathmod(numcha7r,4)*64) + (numcha7s-128) -- 4 times 64 boomy7bit0x = ((mathmod(numcxa7rel,2))==1) boomy7bit5x = mathbittest(numcxa7rel,5) if (booc3block) then boopen7din = true -- pending flag if ((numcxa7rel==215) or (numcxa7rel==223) or (numcxa7rel==247)) then boopen7din = false -- not a letter, we are done end--if if (numcxa7rel==255) then boopen7din = false -- special LC silly "Y" with horizontal doubledot if (booup7cas) then numdel7ta = 121 -- lower->UPPER (distant and reversed order) end--if end--if if (boopen7din) then boois7lowr = boomy7bit5x -- mostly regular block, look at b5 boois7uppr = not boois7lowr if (boois7uppr and boowan7tlowr) then numdel7ta = 32 -- UPPER->lower end--if if (boois7lowr and booup7cas) then numdel7ta = -32 -- lower->UPPER end--if end--if (boopen7din) then break -- to join mark end--if (booc3block) then if (booc4c5blk) then boopen7din = true -- pending flag if ((numcxa7rel==56) or (numcxa7rel==73) or (numcxa7rel==127)) then boopen7din = false -- not a letter, we are done end--if if (numcxa7rel==120) then boopen7din = false -- special UC silly "Y" with horizontal doubledot if (boowan7tlowr) then numdel7ta = -121 -- UPPER->lower (distant and reversed order) end--if end--if if (boopen7din) then if (((numcxa7rel>=57) and (numcxa7rel<=73)) or (numcxa7rel>=121)) then boois7lowr = not boomy7bit0x -- UC odd (misaligned) else boois7lowr = boomy7bit0x -- UC even (ordinary align) end--if boois7uppr = not boois7lowr if (boois7uppr and boowan7tlowr) then numdel7ta = 1 -- UPPER->lower end--if if (boois7lowr and booup7cas) then numdel7ta = -1 -- lower->UPPER end--if end--if (boopen7din) then break -- to join mark end--if (booc4c5blk) then if (boocccfblk) then boois7uppr = ((numcxa7rel>=145) and (numcxa7rel<=171)) boois7lowr = ((numcxa7rel>=177) and (numcxa7rel<=203)) if (boois7uppr and boowan7tlowr) then numdel7ta = 32 -- UPPER->lower end--if if (boois7lowr and booup7cas) then numdel7ta = -32 -- lower->UPPER end--if break -- to join mark end--if (boocccfblk) then if (bood0d3blk) then if (numcxa7rel<=95) then -- messy layout but no exceptions boois7lowr = (numcxa7rel>=48) -- delta $20 or $50 boois7uppr = not boois7lowr numdel7abs = 32 -- $20 if ((numcxa7rel<=15) or (numcxa7rel>=80)) then numdel7abs = 80 -- $50 end--if end--if if ((numcxa7rel>=96) and (numcxa7rel<=129)) then -- no exceptions here boois7lowr = boomy7bit0x -- UC even (ordinary align) boois7uppr = not boois7lowr numdel7abs = 1 end--if if (numcxa7rel>=138) then -- some misaligns here !!!FIXME!!! boois7lowr = boomy7bit0x -- UC even (ordinary align) boois7uppr = not boois7lowr numdel7abs = 1 end--if if (boois7uppr and boowan7tlowr) then numdel7ta = numdel7abs -- UPPER->lower end--if if (boois7lowr and booup7cas) then numdel7ta = -numdel7abs -- lower->UPPER end--if break -- to join mark end--if (bood0d3blk) then break -- finally to join mark -- unknown non-ASCII char is a fact :-( end--while -- fake loop -- join mark (this is FULL) if ((numlong7bor==1) and (numdel7ta~=0)) then -- no risk of carry here strinco7cs = prgpokestring (strinco7cs,numokt7index,(numcha7r+numdel7ta)) end--if if ((numlong7bor==2) and (numdel7ta~=0)) then -- no risk of carry here numdel7car = 0 while true do -- inner genuine loop if ((numcha7s+numdel7ta)<192) then break end--if numdel7ta = numdel7ta - 64 -- get it down into range 128...191 numdel7car = numdel7car + 1 -- BIG ENDIAN 6 bits with carry end--while while true do -- inner genuine loop if ((numcha7s+numdel7ta)>127) then break end--if numdel7ta = numdel7ta + 64 -- get it up into range 128...191 numdel7car = numdel7car - 1 -- BIG ENDIAN 6 bits with carry end--while if (numdel7car~=0) then -- in-place change only if needed strinco7cs = prgpokestring (strinco7cs,numokt7index,(numcha7r+numdel7car)) end--if if (numdel7ta~=0) then -- in-place change only if needed strinco7cs = prgpokestring (strinco7cs,(numokt7index+1),(numcha7s+numdel7ta)) end--if end--if numokt7index = numokt7index + numlong7bor -- advance in incoming string end--while -- genuine loop over incoming string (this is FULL) return strinco7cs end--function prucaseaiofull -- ******************************************* placeholderism -- * HIGH LEVEL STRING PROCEDURES [I7] * ------------------------- -- ******************************************* local function pritest5plejs (stroneplejs, boowantstryg, tabsubtitu) -- Test one placeholder against spec and against table of known placeholders. -- Input : * stroneplejs -- 5 octet:s -- * boowantstryg -- return also string if available -- * tabsubtitu -- optional collection of substitute strings -- (LUA table) using two-letter codes -- as keys, type "nil" for none -- Output : * numtriplejs -- main status: ZERO not valid | ONE valid unknown | -- TWO found also valid value -- * numpl5left, numpl5right -- only for status non-ZERO -- * strkeyval -- * if optional table given then contains value -- only for status TWO and boowantstryg -- * if no table then contains the key (substring of -- stroneplejs) only for status ONE and boowantstryg -- * in all other cases empty string -- Depends on procedures : -- [G] prgtestuc prgstringrange -- [N] prnonehextoint local varduavaluehur = 0 local strmajky = '' local strkeyval = '' -- final key or value local numtriplejs = 0 -- preASSume guilt local numpl5left = 0 -- hex and drop left local numpl5right = 0 -- hex and drop right local numplejodt = 0 -- UC local numplejoet = 0 -- UC local numplejx5u = 0 -- maybe hex local numplejx5v = 0 -- maybe hex while true do -- fake loop if (not prgstringrange(stroneplejs,5,5)) then break -- should be impossible end--if if (string.byte(stroneplejs,1,1)~=64) then break -- not valid per spec end--if numplejodt = string.byte(stroneplejs,2,2) numplejoet = string.byte(stroneplejs,3,3) if ((not prgtestuc(numplejodt)) or (not prgtestuc(numplejoet))) then break -- not valid per spec end--if numplejx5u = prnonehextoint(string.byte(stroneplejs,4,4)) numplejx5v = prnonehextoint(string.byte(stroneplejs,5,5)) if ((numplejx5u==255) or (numplejx5v==255)) then break -- not valid per spec end--if numtriplejs = 1 -- valid now numpl5left = numplejx5u -- do NOT copy in invalid value numpl5right = numplejx5v -- do NOT copy in invalid value strmajky = string.char (numplejodt,numplejoet) -- key if (type(tabsubtitu)=='table') then -- got optional table ?? varduavaluehur = tabsubtitu[strmajky] -- risk of type "nil" if (prgstringrange(varduavaluehur,1,255)) then -- MUST be non-empty if (boowantstryg) then -- else keep empty string strkeyval = varduavaluehur -- table here and found value, return it end--if numtriplejs = 2 -- table here and found value end--if else if (boowantstryg) then -- else keep empty string strkeyval = strmajky -- no table but placeholder valid, return key end--if end--if (type(tabsubtitu)=='table') else break -- finally to join mark end--while -- fake loop -- join mark return numtriplejs, numpl5left, numpl5right, strkeyval end--function pritest5plejs ------------------------------------------------------------------------ local function prifind5items (strwhere, strandevenwhat) -- !!!FIXME!!! flawed, doesn't check hex digits -- Search one or more placeholders in request string, primarily -- intended to be used together with PRIPL5NAVARE. -- Input : * long string where to search (for example "Kapvorto (@LK00)") -- * even number of char:s what to search (for example "WCWU") -- Output : * boolean ("true" if any found, "false" for our example) local strcxztvaa = '' local numcxzlen = 0 local numcxzind = 1 -- ONE-based step TWO local boofoundthecrap = false numcxzlen = string.len(strandevenwhat) while true do if (numcxzind>=numcxzlen) then break -- not found end--if strcxztvaa = '@' .. string.sub(strandevenwhat,numcxzind,(numcxzind+1)) boofoundthecrap = (string.find(strwhere,strcxztvaa,1,true)~=nil) if (boofoundthecrap) then break -- found any of them, done end--if numcxzind = numcxzind + 2 end--while return boofoundthecrap end--function prifind5items ------------------------------------------------------------------------ local function pripl5navare (strrekvest, tabsubstut) -- Insert selected substitute strings into request string at given -- positions with optional dropping if a valid non-empty substitute -- string is unavailable. -- Input : * strrekvest -- request string (maybe containing placeholders, -- syntax see below, empty string legal, other -- data type NOT legal) -- * tabsubstut -- obligatory collection of substitute strings -- (LUA table) using two-letter codes as keys -- Output : * strhazil -- This obeys PLRISM.TXT . -- Depends on procedures : -- [I7] pritest5plejs -- [G] prgtestuc prgstringrange -- [N] prnonehextoint -- Syntax of the named and variable placeholder: -- * fixed "@" -- * 2 uppercase ASCII letters select the substitute string from -- collection supplied by the caller -- * 2 hex digits control dropping left and right (0...15 char:s) -- Empty item in "tabsubstut" (key does not exist, empty string "", or -- non-string value, the latter discouraged) is legal and safe and results -- in dropping if some of the control numbers is non-ZERO. Left dropping -- is practically performed on "strhazil" whereas right dropping on -- "strrekvest" and "numrekvinx". Dropping is protected from access -- out of range. -- ZERO iterations of the loop over request string are possible, -- namely if request string "strrekvest" is empty. -- If uppercasing or other adjustment is needed, then the caller must -- take care of it by providing several separate substitute strings with -- separate names in the collection ("tabsubstut"), such is NOT done here. local strhazil = '' local stronevalue = '' local numrekvlen = 0 local numrekvinx = 0 -- src index ZERO-based local numremainder = 0 local numpltristeta = 0 local numnonhitoct = 0 local numammlef = 0 -- drop left local numammrig = 0 -- drop right numrekvlen = string.len(strrekvest) while true do -- genuine loop over request string, "numrekvinx" is counter if (numrekvinx>=numrekvlen) then break -- done end--if numnonhitoct = string.byte(strrekvest,(numrekvinx+1),(numrekvinx+1)) numpltristeta = 0 -- preASSume no valid placeholder here if ((numrekvinx+5)<=numrekvlen) then -- beware of risk of overflow numpltristeta, numammlef, numammrig, stronevalue = pritest5plejs (string.sub(strrekvest,(numrekvinx+1),(numrekvinx+5)), true, tabsubstut) end--if if (numpltristeta==2) then -- found strhazil = strhazil .. stronevalue -- insert non-empty substitute numrekvinx = numrekvinx + 5 -- consumed 5 char:s, cannot overflow here end--if if (numpltristeta==1) then -- placeholder valid per spec but empty unknown numremainder = string.len(strhazil) - numammlef -- this can underflow if (numremainder<=0) then strhazil = '' -- drop left -- leaving nothing behind else strhazil = string.sub(strhazil,1,numremainder) -- drop left end--if numrekvinx = numrekvinx + 5 + numammrig -- drop right this can overflow end--if if (numpltristeta==0) then -- no valid placeholder here strhazil = strhazil .. string.char(numnonhitoct) -- copy octet as-is numrekvinx = numrekvinx + 1 -- consumed 1 char end--if end--while -- genuine loop over request string, "numrekvinx" is counter return strhazil end--function pripl5navare -- ***************************** !!!FIXME!!! move from here -- * SOME PROCEDURES [?] * --------------------------------------- -- ***************************** -- Local function LFILEFTRIGHT -- Brew wikilink from 2 elements, primitive with optimization. local function lfileftright (strbigleft, strbigright) local strwikilink = '' if ((strbigright=='') or (strbigleft==strbigright)) then strwikilink = strbigleft -- save bloat else strwikilink = strbigleft .. '|' .. strbigright -- here genuine wall needed end--if strwikilink = '[[' .. strwikilink .. ']]' -- always link return strwikilink end--function lfileftright -- ************************************ -- * HIGH LEVEL PROCEDURES [H0] * -------------------------------- -- ************************************ local function lffillkaton (stritem, boomain) -- Add one string and maybe one bool to global "qtabktaoj" provided the -- string is nonempty and not yet in and there is some space left. -- This proc has exclusive write access to "qtabktaoj". Do NOT write to it -- in any other way except during declaration, initialization, finalization. -- We allow max 16 cat:s from auto split or split control parameter, as -- well as max 4 cat:s from extra parameter, but there is a sum limit of 18. local numsrchindex = 0 local varpeek = 0 while true do if (numsrchindex==18) then break -- no free slot left end--if varpeek = qtabktaoj[numsrchindex] if (varpeek==stritem) then numsrchindex = 18 break -- already in end--if if (varpeek==nil) then break -- found free slot end--if numsrchindex = numsrchindex + 1 end--while if (numsrchindex~=18) then qtabktaoj[numsrchindex] = stritem if (boomain) then qtabktaoj[numsrchindex+20] = true end--if end--if end--function lffillkaton ------------------------------------------------------------------------ -- Local function PRHGET345NONIL -- we read from global "contabktaoj" index 3...5 -- "nummortyyp" mortyp "W" has code 87 and gives index 3 or 4 -- "nummortyyp" mortyp other has code < 87 (ZERO is safe) and gives index 5 -- "boofraazo" can be assigned to "false" if not needed (index 5) local function prhget345nonil (nummortyyp, boofraazo) local strctlstring = '' local numpiinx = 0 -- temp 3...5 if (nummortyyp==87) then numpiinx = 3 -- vortgrupo contains "W" if (boofraazo) then numpiinx = 4 -- kalimat contains "W" end--if else numpiinx = 5 -- word can contain C I M N P U but obviously not "W" end--if strctlstring = contabktaoj[numpiinx] -- pick main data string risk for "nil" if (type(strctlstring)~='string') then strctlstring = '' -- fool-proof end--if return strctlstring -- can be empty but NOT type "nil" end--function prhget345nonil -- ************************************ splitting -- * HIGH LEVEL PROCEDURES [H5] * -------------------------------- -- ************************************ local function lfhsplitaa (strlemmain, tabblokr, tablinker, boomorfium, bookalimat, tabkoudo) -- Perform the automatic multiword split or assisted split controlled -- by 2 prevalidated tables. -- Note that the split can sort of fail and return same string, most notably -- if no split boundaries exist, or some do exist but all are blocked. -- Counting of the boundaries is tricky. We DO count the suppressed ones but -- do NOT count multiple consecutive non-letters more than once. Thus the -- boundaries are between words only and at begin and end, there CANNOT -- be empty content between 2 boundaries. We usually have 2 faked empty -- boundaries at begin and end, but they can also be real and count then. -- For example "AND YES, we !,definit-ely,! can." contains 5 words (that -- can become 5 output fragments numbered 0...4) and 5 input boundaries -- (numbered 0...4). In the text "?va?" there are 2 boundaries at begin -- and end. -- We need "pripl5navare" (2 para) and table "contabktaoj" -- controlling the structure of the cat name. "boomorfium" must be -- false unless lng in "tabkoudo" is valid and known. -- Names of the categories are built from "contabktaoj" index 3 (vortgrupo) -- or 4 (frazo) but here not 5 (vorto, useful for manual split). Categories -- are brewed only if "boomorfium" is true, the split does not fail, and the -- individual fragment is not blocked. For example "va" will neither link nor -- categorize but "va?" will do both. The "#"..."N"-syntax blocks both linking -- and morpheme categorization (if the latter is enabled otherwise). Even if -- linking is blocked for other reason (most notably only 1 fragment generated -- after split attempt) then categorization is suppressed as well. -- Input : * "strlemmain" -- input text (pagename) -- * "tabblokr" -- index 0...15 holes permitted, from "%" -- * "tablinker" -- index 0...15 holes permitted, from "#" -- * "boomorfium" -- "true" if compound cat:s are desired -- * "bookalimat" -- "true" is word class "KA" was specified -- * "tabkoudo" -- lng stuff ("??" legal but needs "boomorfium") -- Output : * "stromong" -- wikitext to be sent to screen -- This function fills global "qtabktaoj" index [0]...[15] with names of -- morpheme cat:s (index [20]...[35] main page status not used here). -- Depends on procedures : -- [I7] pritest5plejs pripl5navare -- [H0] lffillkaton prhget345nonil -- [U] prulnutf8char prucaseaiofull -- [G] prgtestuc prgtestlc prgpokestring -- [E] mathdiv mathmod mathbittest -- "HIGH LEVEL FUNCTIONS"\"lfileftright". local varrisktabl = 0 -- can be type "nil" local strfragment = '' local strfragdext = '' -- right part with visible text (wall not included) local stromong = '' -- final result local strkattcty = '' local strkatoon = '' -- for "lffillkaton" local numloonginp = 0 -- length of input local numinxed = 0 -- ZERO-based index of input char:s local numboundrinp = 0 -- counter of detected boundaries include suppressed local numoutfrag = 0 -- counter of produced fragments local numotcot = 0 local numotcet = 0 local numotcuu = 0 -- control code from "tablinker" (ZERO is "nil" ie none) local boohavechar = false local booqboueof = false -- combo status: boundary char or end of string local booprevqbe = false -- previous combo status local boosuppress = false -- suppress split but still do count the boundary local boodolnkkat = false -- do link and maybe categorize the fragment numloonginp = string.len(strlemmain) while true do if (numinxed==numloonginp) then boohavechar = false booqboueof = true -- copied whole string and end of fragment boosuppress = false -- last chance, we must output accumulated fragment else boohavechar = true -- can be part of word or boundary !!! numotcot = string.byte (strlemmain,(numinxed+1),(numinxed+1)) numinxed = numinxed + 1 -- ZERO-based booqboueof = ((numotcot==32) or prgtestpuncture(numotcot)) boosuppress = (tabblokr[numboundrinp]=="1") end--if if (booprevqbe and (booqboueof==false)) then numboundrinp = numboundrinp + 1 -- count even suppressed boundaries end--if booprevqbe = booqboueof -- assign previous status for next round if (booqboueof and (not boosuppress) and (strfragment~='')) then strfragdext = strfragment -- visible text right of the wall "|" boodolnkkat = false -- preassume no link no cat if ((stromong~='') or boohavechar) then -- avoid selflink to page varrisktabl = tablinker[numoutfrag] -- can be type "nil" numotcuu = 0 if (type(varrisktabl)=='string') then numotcuu = string.byte (varrisktabl,1,1) end--if if (numotcuu==73) then -- "I" lowercase strfragment = prucaseaiofull (strfragment,false,false) end--if if (numotcuu==65) then -- "A" uppercase strfragment = prucaseaiofull (strfragment,true,false) end--if if (numotcuu==58) then -- ":" explicit replace strfragment = string.sub (varrisktabl,2,string.len(varrisktabl)) end--if boodolnkkat = (numotcuu~=78) -- "boodolnkkat" needed below 2 times end--if ((stromong~='') or boohavechar) then if (boodolnkkat) then stromong = stromong .. lfileftright (strfragment,strfragdext) -- wlink else stromong = stromong .. strfragment -- add raw fragment no link end--if if (boomorfium and boodolnkkat) then strkattcty = prhget345nonil (87,bookalimat) -- always "W" thus 5 imposs numotcet = string.len(strkattcty) -- this is automatic or assisted if (numotcet>=2) then tabkoudo['WC'] = nil -- no stupid word class here tabkoudo['WU'] = nil -- no stupid word class here tabkoudo['MT'] = nil -- a word does not have any morpheme type tabkoudo['FR'] = strfragment strkatoon = pripl5navare (strkattcty,tabkoudo) lffillkaton (strkatoon,false) -- NOT main page -- "qtabktaoj" end--if (numotcet>=2) then end--if (boomorfium and boodolnkkat) then strfragment = '' numoutfrag = numoutfrag + 1 -- count fragments "lffillkaton" separately end--if (booqboueof and (not boosuppress) and (strfragment~='')) then if (boohavechar) then if (booqboueof and (not boosuppress)) then stromong = stromong .. string.char(numotcot) -- add non-linkable char else strfragment = strfragment .. string.char(numotcot) -- add chr to fragm end--if else break -- done all end--if end--while return stromong end--function lfhsplitaa ------------------------------------------------------------------------ -- Local function LFHSPLITMN -- Perform the manual split controlled by one prevalidated table. Actually -- the table contains the presplit complete lemma and the pagename is not -- needed at all. Max 16 fragments can come in, type "F000" does count. We -- rely on all details being prevalidated (number of fragments, plusses and -- rectangular brackets, colons and slashes, only valid uppercase letters -- before colon, legal use of "L:", ...). -- We need "pripl5navare" (2 para) and table "contabktaoj" -- controlling the structure of the cat name. "boomorkat" must be -- false unless lng in "tabkuodo" is valid and known. -- Names of the categories are built from "contabktaoj" index 3 (vortgrupo) -- or 4 (frazo) or 5 (vorto). -- The source string uses slashes "/" as field separator but the destination -- string uses walls "|". -- Omitting deleted characters and dash adding are performed only for -- fragment type "F210" ie only one field after ":" and no slash "/". -- Also "L" is permitted for fragment type "F210" only but this is -- prevalidated. Note that in the early prevalidation step the debracketing -- for the "sum check" is NOT limited to fragment type "F210". -- We have to maintain 2 separate fragment counters. For example valid syntax -- "[M:kung]+a+[M:doeme]" gives 3 input fragments in "tabmnfragoj", but only -- 2 output fragments in "qtabktaoj", and we want them to have indexes 0 -- and 1, not 0 and 2. The out counter is not explicit, it is the content -- of "qtabktaoj" processed in "lffillkaton". -- There is a problem with the wikisyntax, for example "[[no]]pe" will act as -- "[[no|nope]]" ie the visible link text will continue beyond the bracket -- and cover the "pe", whereas "[[no]]??" does not trigger such behavior. To -- prevent this from happening we must add something invisible, and we use -- "<i></i>". -- here we DO introduce wikilinks with double brackets and walls -- here we DO expand "+" to " + " (between fragments) -- here we DO add dashes to some affixes (fragment type "F210") -- here we do NOT carry out the "sum check" (done in the prevalidation) -- Input : * "tabmnfragoj" -- prevalidated presplit table "+[I:bug/BUG]" -- * "boomorkat" -- "true" if compound cat:s are desired -- * "bookalymat" -- "true" is word class "KA" was specified -- * "tabkuodo" -- lng stuff ("??" legal but needs "boomorkat") -- Output : * "strumung" -- wikitext to be sent to screen -- This function fills global "qtabktaoj" index [0]...[15] with names of -- morpheme cat:s (index [20]...[35] main page status not used here). -- Depends on procedures : -- [H0] lffillkaton prhget345nonil -- [I7] pritest5plejs prifind5items pripl5navare -- [I] lfidebracket -- [G] prgtestuc -- On "STRING FUNCTIONS"\"lfiremove2bra" and -- "STRING FUNCTIONS"\"lfiaddthedash" and -- "HIGH LEVEL FUNCTIONS"\"lfileftright". local function lfhsplitmn (tabmnfragoj, boomorkat, bookalymat, tabkuodo) local varrysktabl = 0 -- from in table can be type "nil" local strumung = '' -- final result with links local strwalzleft = '' local strwallrght = '' local strwallcatg = '' -- same as "strwalzleft" unless "L"-trick is used local strkattctx = '' local strkatton = '' -- for "lffillkaton" local numinnfrog = 0 -- counter in "tabmnfragoj" type "F000" does count local numlenfrago = 0 -- ONE-based last valid index local numivnxed = 0 -- ONE-based index of char:s inside fragment local numcuaar = 0 local numcuabr = 0 -- +1 local numcuacr = 0 -- +2 local numcom1of79z = 0 -- 0 | 67 C 73 I 76 L 77 M 78 N 80 P 85 U | 87 W local booeldtrick = false -- true for the "L"-trick giving type "N" local booright = false -- false left | true right local boohavecolon = false local boo210magic = false -- enhance and strip then local booneedmor = false while true do -- outer loop counts fragments in table booeldtrick = false -- separate verdict for every fragment boohavecolon = false -- separate verdict for every fragment boo210magic = false -- separate verdict for every fragment numcom1of79z = 0 -- default none, separate verdict for every fragment varrysktabl = tabmnfragoj [numinnfrog] -- can be type "nil" !!! numinnfrog = numinnfrog + 1 if (type(varrysktabl)~='string') then break -- give up on "nil" end--if numlenfrago = string.len (varrysktabl) -- cannot be empty numivnxed = 1 -- ONE-based numcuaar = string.byte (varrysktabl,1,1) if (numcuaar==43) then numivnxed = 2 -- ONE-based skip the "+" even for type "F000" far below strumung = strumung .. ' + ' -- add the spaces here numcuaar = string.byte (varrysktabl,2,2) -- pick new char cannot be "+" end--if if (numcuaar==91) then -- bracketed []-fragment processed char-by-char numivnxed = numivnxed + 1 -- now at least 2 strwalzleft = '' strwallrght = '' booright = false numcuabr = 0 numcuacr = 0 -- minimal fe "[M:x]" 5 char:s 1...5 or 2...6 if ((numlenfrago-numivnxed)>=3) then numcuabr = string.byte (varrysktabl,numivnxed,numivnxed) numcuacr = string.byte (varrysktabl,(numivnxed+1),(numivnxed+1)) end--if if ((numcuacr==58) and prgtestuc(numcuabr)) then numcom1of79z = numcuabr -- "numcuabr" is prevalidated ;-) numivnxed = numivnxed + 2 -- eat it away too boohavecolon = true -- fragment type "F210" or "F211" if (numcom1of79z==76) then booeldtrick = true -- fe "fer(o)" -> link "fero" and categ "fer" numcom1of79z = 78 -- "L" -> "N" end--if end--if while true do -- inner loop counts char:s in a bracketed []-fragment if (numivnxed==numlenfrago) then break -- skip trailing ']' guaranteed to exist end--if numcuaar = string.byte (varrysktabl,numivnxed,numivnxed) if (booright) then strwallrght = strwallrght .. string.char (numcuaar) -- wall NOT po else if (numcuaar==47) then booright = true -- source separating slash "/" else strwalzleft = strwalzleft .. string.char (numcuaar) end--if end--if numivnxed = numivnxed + 1 end--while if (strwallrght=='') then strwallrght = strwalzleft -- type "F200" or "F210" boo210magic = boohavecolon -- magic qualifies only if type is F210 end--if if (boo210magic) then -- try enhance left fe "il" -> "-il-" if (numcom1of79z==80) then strwalzleft = lfiaddthedash (strwalzleft,false,true) -- P end--if if (numcom1of79z==85) then strwalzleft = lfiaddthedash (strwalzleft,true,false) -- U end--if if (numcom1of79z==73) then strwalzleft = lfiaddthedash (strwalzleft,true,true) -- I end--if end--if strwallcatg = strwalzleft -- seize after enhancing before stripping if (boo210magic) then -- always strip but in various ways strwalzleft = lfiremove2bra (strwalzleft) -- link "kac(o)" -> "kaco" if (booeldtrick) then -- "L" -> "N" strwallcatg = lfidebracket (strwallcatg,true,1) -- for the category else strwallcatg = lfiremove2bra (strwallcatg) -- for the category end--if end--if strumung = strumung .. lfileftright (strwalzleft,strwallrght) .. '<i></i>' -- always link if (boomorkat and (numcom1of79z~=0)) then strkattctx = prhget345nonil (numcom1of79z,bookalymat) -- 3 or 4 or 5 numcuaar = string.len(strkattctx) -- this is the manual split if (numcuaar>=2) then booneedmor = prifind5items(strkattctx,"MT") -- need it ?? tabkuodo["WC"] = nil -- no stupid word class here tabkuodo["WU"] = nil -- no stupid word class here if (booneedmor) then tabkuodo["MT"] = string.char(numcom1of79z) -- morpheme type else tabkuodo["MT"] = nil -- no morpheme type here end--if tabkuodo["FR"] = strwallcatg -- fragment or word strkatton = pripl5navare (strkattctx,tabkuodo) lffillkaton (strkatton,false) -- NOT main page -- "qtabktaoj" end--if (numcuaar>=2) then end--if (boomorkat and (numcom1of79z~=0)) then else strumung = strumung .. string.sub (varrysktabl,numivnxed,numlenfrago) -- copy type F000 as-is end--if (numcuaar==91) else end--while return strumung end--function lfhsplitmn ------------------------------------------------------------------------ -- Local function LFHSPLITSI -- Perform the simple root split (3, "$S") or simple bare -- root (4, "$B") strategy. Pagename is needed. -- $S simple root split suno -> sun + [-o/o] kat "N!sun" + "U:-o" -- Suno -> [suno/Sun] + [-o/o] kat "N!sun" + "U:-o" -- $B simple bare root sun -> sun kat "M!sun" -- Sun -> [sun/Sun] kat "M!sun" -- $B simple bare root NR # -> # kat "N!#" -- ("#" represents a Chinese letter) -- Note that for $S the mortyp is always "N" (nonstandalone) whereas -- for $B it can be either "M" (standalone) or "N". -- We need "pripl5navare" (2 para) and table "contabktaoj" -- controlling the structure of the cat name. "bookomdez" must be -- false unless lng in "tablngbah" is valid and known. -- Names of the categories are built from "contabktaoj" index 5 (vorto). -- Input : * "strhalaman" -- input lemma ie pagename -- * "numkodsplit" -- 3 or 4 for $S or $B -- * "bookomdez" -- "true" if compound cat:s are desired at all -- * "boonitro" -- "true" if word class is NR -- * "tablngbah" -- lng stuff ("??" legal but needs "bookomdez") -- Output : * "strymyng" -- wikitext to be sent to screen -- This function fills global "qtabktaoj" index [0]...[15] with names of -- morpheme cat:s and maybe index [20]...[35] with main page status. -- In fact only one index (probably [20]) can receive the "true" here. -- Depends on procedures : -- [H0] lffillkaton prhget345nonil -- [I7] pritest5plejs pripl5navare -- [U] prulnutf8char prucaseaiofull -- [G] prgtestuc prgtestlc prgpokestring -- [E] mathdiv mathmod mathbittest local function lfhsplitsi (strhalaman, numkodsplit, bookomdez, boonitro, tablngbah) local strtakkctx = '' -- contabktaoj[5] index 5 is hardcoded local strymyng = '' -- screen local strlover = '' -- brewed from "strhalaman" : "Suno" -> "suno" local strnolast = '' -- brewed from "strhalaman" : "Suno" -> "Sun" local strnolaslow = '' -- brewed from "strlover" : "Suno" -> "sun" local strkatroot = '' local strcatoton = '' local nummortyp = 0 -- 77 "M" or 78 "N" only local numdewsx = 0 local numlasst = 0 -- last char of lemma or ZERO if not separated local numcauar = 0 local numcaubr = 0 local booindeedlow = false numdewsx = string.len (strhalaman) strlover = prucaseaiofull(strhalaman,false,false) booindeedlow = (strlover==strhalaman) numlasst = 0 -- needed far below nummortyp = 77 -- "M" if (boonitro or (numkodsplit==3)) then nummortyp = 78 -- "N" end--if if (numkodsplit==3) then strnolast = string.sub (strhalaman,1,(numdewsx-1)) -- cut off last char strnolaslow = string.sub (strlover,1,(numdewsx-1)) -- cut off & lowercase numlasst = string.byte (strhalaman,numdewsx,numdewsx) -- needed far below if (booindeedlow) then strymyng = strnolast -- as-is lowercase else strymyng = '[[' .. strlover .. '|' .. strnolast .. ']]' -- link end--if strymyng = strymyng .. ' + [[-' .. string.char(numlasst) .. '|' .. string.char(numlasst) .. ']]' strkatroot = strnolaslow -- $S end--if if (numkodsplit==4) then if (booindeedlow) then strymyng = strhalaman -- as-is lowercase else strymyng = '[[' .. strlover .. '|' .. strhalaman .. ']]' -- link end--if strkatroot = strlover -- $B end--if if (bookomdez) then strtakkctx = prhget345nonil (0,false) -- pick main data string 5 hardcoded numcauar = string.len(strtakkctx) -- simple "strtakkctx" can be used twice if (numcauar>=2) then tablngbah["WC"] = nil -- no stupid word class here tablngbah["WU"] = nil -- no stupid word class here tablngbah["MT"] = string.char(nummortyp) tablngbah["FR"] = strkatroot strcatoton = pripl5navare (strtakkctx,tablngbah) lffillkaton (strcatoton,true) -- YES main page -- "qtabktaoj" if (numlasst~=0) then tablngbah["MT"] = 'U' -- last letter is suffix "U" tablngbah["FR"] = '-' .. string.char(numlasst) strcatoton = pripl5navare (strtakkctx,tablngbah) lffillkaton (strcatoton,false) -- NOT main page -- "qtabktaoj" end--if end--if (numcauar>=2) then end--if (bookomdez) then return strymyng end--function lfhsplitsi ------------------------------------------------------------------------ local function lfhsplitlale (strhilaman, bookomdoz, tablngbaih) -- Perform the large letter split (5, "$H"). -- The lemma is split into single letters. This is most useful for but -- not restricted to Chinese ones. Note that for this split the mortyp is -- always "M" (standalone). Use manual split for other cases. -- We need "pripl5navare" (2 para) and table "contabktaoj" -- controlling the structure of the cat name. "bookomdoz" must be -- false unless lng in "tablngbaih" is valid and known. -- Names of the categories are built from "contabktaoj" index 5 (vorto). -- Input : * "strhilaman" -- input lemma ie pagename -- * "bookomdoz" -- "true" if compound cat:s are desired at all -- * "tablngbaih" -- lng stuff ("??" legal but needs "bookomdez") -- Output : * "strygyng" -- wikitext to be sent to screen -- This function fills global "qtabktaoj" index [0]...[15] with names of -- morpheme cat:s (index [20]...[35] main page status not used here). -- Depends on procedures : -- [H0] lffillkaton prhget345nonil -- [I7] pritest5plejs pripl5navare -- [U] prulnutf8char local strtookctj = '' -- contabktaoj[5] index 5 is hardcoded local strygyng = '' -- screen local strbeexess = '' local strcatatan = '' local numinwwlen = 0 local numwwindex = 1 -- ONE-based local numwwchar = 0 local numwwlen = 0 numinwwlen = string.len(strhilaman) while true do -- genuine loop, counter is "numwwindex" step 1...4 if (numwwindex>numinwwlen) then break -- done (risk of overflow) end--if numwwchar = string.byte (strhilaman,numwwindex,numwwindex) numwwlen = prulnutf8char (numwwchar) if (numwwlen==0) then strygyng = strhilaman -- this is criminal break -- some compound cat:s may be left behind :-( end--if strbeexess = string.sub (strhilaman,numwwindex,(numwwindex+numwwlen-1)) if (strygyng~='') then strygyng = strygyng .. ' + ' end--if strygyng = strygyng .. '[[' .. strbeexess .. ']]' if (bookomdoz) then strtookctj = prhget345nonil (0,false) -- pick main data string 5 hardco numwwchar = string.len(strtookctj) -- this is large letter split if (numwwchar>=2) then tablngbaih['WC'] = nil -- no stupid word class here tablngbaih['WU'] = nil -- no stupid word class here tablngbaih['MT'] = 'M' tablngbaih['FR'] = strbeexess strcatatan = pripl5navare (strtookctj,tablngbaih) lffillkaton (strcatatan,false) -- NOT main page -- "qtabktaoj" end--if (numwwchar>=2) then end--if (bookomdoz) then numwwindex = numwwindex + numwwlen -- step 1...4 risk of overflow end--while return strygyng end--function lfhsplitlale -- *********************** -- * VARIABLES [R] * --------------------------------------------- -- *********************** function exporttable.ek (arxframent) -- general unknown type local vartamp = 0 -- variable without type -- special type "args" AKA "arx" local arxmodmod = 0 -- from module -- general tab in from caller ("qtabktaoj" is elsewhere) local tabbluck = {} -- from "%"-syntax assi local tablynx = {} -- from "#"-syntax assi local tabmnfrags = {} -- for manual split local tabextfriig = {} -- from extra parameter local tablngdbl = {} -- double-letter indexes -- general str ("qstrtrace" is elsewhere) local strkaatctl = '' -- picked from "contabktaoj" via "prhget345nonil" local strlemmain = '' -- lemma in local strlemmaut = '' -- bold lemma (maybe split) out local strutmp = '' -- temp -- general num local numsplyt = 0 -- split strategy (0 auto 1 assisted 2 manu 7 none) local numerr = 0 local numtamp = 0 local numoct = 0 local numodt = 0 local numlindex = 0 -- boo from parent local boocatdesir = false local booexteval = false -- true if we got the extra parameter local boohavnyrr = false -- true if we got "NR" local boohavkall = false -- true if we got "KA" -- misc boo local bootimp = false -- ****************** -- * MAIN [Z] * -------------------------------------------------- -- ****************** ---- ASSIGN AND BOAST ---- prdtracemsg ('This is "msplitter" submodule, requested "detrc" report') ---- GET THE ARX ---- arxmodmod = arxframent.args while true do -- fake loop if (type(arxmodmod)~='table') then prdtracemsg ('Overall bad data type') numerr = 2 -- #E02 break end--if boocatdesir = arxmodmod[ 0] strlemmain = arxmodmod[ 1] numsplyt = arxmodmod[ 2] if ((type(boocatdesir)~='boolean') or (type(strlemmain)~='string') or (type(numsplyt)~='number')) then prdtracemsg ('Index 0...2 bad data type') numerr = 3 -- #E03 break end--if tabbluck = arxmodmod[ 3] tablynx = arxmodmod[ 4] tabmnfrags = arxmodmod[ 5] tabextfriig = arxmodmod[ 6] booexteval = arxmodmod[ 7] -- boolean between tables !!! tablngdbl = arxmodmod[ 8] boohavnyrr = arxmodmod[ 9] -- NR boohavkall = arxmodmod[10] -- KA qboodetrc = (arxmodmod[15]==true) if ((type(booexteval)~='boolean') or (type(tablngdbl)~='table') or (type(boohavnyrr)~='boolean') or (type(boohavkall)~='boolean')) then prdtracemsg ('Index 7...10 bad data type') numerr = 4 -- #E04 end--if break end--while -- fake loop if (numerr==0) then prdtracemsg ('Incoming table OK') end--if ---- SPLIT THE LEMMA IF NEEDED ---- -- process from "strlemmain" (sudah guaranteed to be -- non-empty) to "strlemmaut" (actually NOT for manual split) -- "numsplyt" : 0 auto 1 assisted 2 manu 3 srs 4 sbr 5 lale 7 none -- we skip the split and copy only if: -- * "numsplyt" is 7 (#S7 no split) -- punctuation (5 char:s: ! , . ; ?) 21 33 | 2C 44 | 2E 46 | 3B 59 | 3F 63 -- dash "-" and apo "'" do NOT count as punctuation (for auto and assisted) -- we depend on "boocatdesir" (they can switch off some cat:s) -- we depend on "boohavkall" (switches between "vortgrupo" and "frazo") -- "qtabktaoj" is very global -- 0...17 cat names without "Category:" prefix, unused "nil" -- 20...37 "true" if main page, otherwise "nil" -- "lfhsplitaa" and "lfhsplitmn" and "lfhsplitsi" and "lfhsplitlale" will fill -- it (via "lffillkaton") and below more content comes from extra parameter if (numerr==0) then if (numsplyt<2) then -- ZERO or ONE -> auto or assisted #S0 #S1 strlemmaut = lfhsplitaa (strlemmain, tabbluck, tablynx, boocatdesir, boohavkall, tablngdbl) end--if if (numsplyt==2) then -- 2 -> manu #S2 strlemmaut = lfhsplitmn (tabmnfrags, boocatdesir, boohavkall, tablngdbl) end--if if ((numsplyt==3) or (numsplyt==4)) then -- 3 4 -> simple #S3 #S4 strlemmaut = lfhsplitsi (strlemmain, numsplyt, boocatdesir, boohavnyrr, tablngdbl) end--if if (numsplyt==5) then -- 5 -> lale #S5 strlemmaut = lfhsplitlale (strlemmain, boocatdesir, tablngdbl) end--if if (numsplyt==7) then -- 7 -> no split #S7 strlemmaut = strlemmain -- no split, "strlemmaut" needed for visible part end--if end--if ---- BREW UP TO 4 EXTRA CAT INSERTIONS ---- -- from extra parameter sent to us in "tabextfriig" and "booexteval" -- with "booexteval" true prevalidated morphemes are be in -- "tabextfriig" incl prefix fe "C:" or "M!", the caller -- converts possible "&"-syntax to 1 or 2 fragments -- with "booexteval" false the extra parameter was empty and -- we do nothing here if ((numerr==0) and boocatdesir and booexteval) then numlindex = 0 while true do vartamp = tabextfriig[numlindex] -- risk of type "nil" if (type(vartamp)=='string') then numoct = string.byte(vartamp,1,1) -- C I M N P U W numodt = string.byte(vartamp,2,2) -- ":" 58 or "!" 33 numtamp = string.len (vartamp) strutmp = string.sub (vartamp,3,numtamp) -- prevalidated morpheme string strkaatctl = prhget345nonil (numoct,boohavkall) -- pick main data str numtamp = string.len(strkaatctl) -- this is main brewing 4 extra cat:s if (numtamp>=2) then bootimp = prifind5items(strkaatctl,'MT') -- need it ?? tablngdbl['WC'] = nil -- no stupid word class here tablngdbl['WU'] = nil -- no stupid word class here if (bootimp) then tablngdbl['MT'] = string.char(numoct) -- morpheme type else tablngdbl['MT'] = nil -- no morpheme type here end--if tablngdbl['FR'] = strutmp strutmp = pripl5navare (strkaatctl,tablngdbl) lffillkaton (strutmp,(numodt==33)) -- MAYBE main page -- "qtabktaoj" end--if (numtamp>=2) then else break -- abort at type "nil" end--if (type(vartamp)=='string') else numlindex = numlindex + 1 end--while end--if ---- PREPARE RETURN ---- prdtracemsg ('Split done, strlemmaut is "' .. strlemmaut .. '"') if (numerr~=0) then strlemmaut = '//' -- still use qtabktaoj [52] to check status end--if qtabktaoj [50] = strlemmaut -- unconditionally qtabktaoj [51] = qstrtrace -- unconditionally, cannot be empty qtabktaoj [52] = numerr -- unconditionally ---- RETURN THE INNER RESULT TABLE ---- return qtabktaoj end--function exporttable.ek ---- RETURN THE LUA TABLE ---- return exporttable anw9qed58quhwfldhnm9sqmnkbmcnbg boxing 0 128373 1475761 1130721 2026-09-06T13:01:44Z Taylor 49 4683 == angla == === Substantivo === {{livs|en|SB|fra=[M:box]+[U:ing]}} ===={{Signifoj}}==== # {{k|en|F: sporto}} [[boksado]]; [[boksosporto]] {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} 1475761 wikitext text/x-wiki == angla == === Substantivo === {{livs|en|SB|fra=[M:box]+[U:ing]}} ===={{Signifoj}}==== # {{k|en|F: sporto}} [[boksado]]; [[boksosporto]] {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} 5vvttdfrtmv7dd52yvswvcralf50gxq överljudsflygplan 0 138038 1475764 1131772 2026-09-06T13:03:53Z Taylor 49 4683 -troaj () 1475764 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=[M:över]+[M:ljud]+s+[M:flyg(a)]+[M:plan]|ext=[M:flygplan]}} * (ett) överljudsflygplan, överljudsflygplanet ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[supersona aviadilo]] #: {{sino|[[överljudsplan]]}} #: {{vian|[[överljudshastighet]]}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se|kv=överljudsplan}} qtg5vgk9nqkj4tjl90ke853yo4pgn2l lekplats 0 271017 1475766 2026-09-06T13:08:21Z Taylor 49 4683 == sveda == === Substantivo === {{livs|sv|SB|fra=[M:lek]+[M:plats]}} * (en) lekplats, lekplatsen ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[ludejo]] {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 1475766 wikitext text/x-wiki == sveda == === Substantivo === {{livs|sv|SB|fra=[M:lek]+[M:plats]}} * (en) lekplats, lekplatsen ===={{Signifoj}}==== # {{k|sv|F: aviado}} [[ludejo]] {{Vortfaradoj}} {{vfvg|sv}} {{Referencoj}} * {{vikipedenlin|ling=sv}} * {{ref-svenska-se}} 0czk3obpnwkue3fuxmfc1hvcg8kgq2s gerrymandering 0 271018 1475770 2026-09-06T13:24:22Z Taylor 49 4683 == angla == === Substantivo === {{livs|en|SB|fra=[M:Gerry/gerry]+[salamander/(sala)mander]+[U:ing]}} {{Prononco}} * {{IFA|/ˈdʒɛ.ɹiˌmæn.də.ɹɪŋ/|/ˈɡɛ.ɹiˌmæn.də.ɹɪŋ/}} * {{aŭdo|LL-Q1860 (eng)-Vealhurl-gerrymandering.wav}} ===={{Signifoj}}==== # {{k|en|F: politiko}} manipulado de elektodistriktoj por partia avantaĝo <ref>[https://aljazeera.com/news/longform/2026/5/19/how-the-shape-of-a-map-can-determine-the-us-midterm-elections aljazeera.com] klarigo kaj ludo</ref> #: {{vian|[[redistricting]]}} { 1475770 wikitext text/x-wiki == angla == === Substantivo === {{livs|en|SB|fra=[M:Gerry/gerry]+[salamander/(sala)mander]+[U:ing]}} {{Prononco}} * {{IFA|/ˈdʒɛ.ɹiˌmæn.də.ɹɪŋ/|/ˈɡɛ.ɹiˌmæn.də.ɹɪŋ/}} * {{aŭdo|LL-Q1860 (eng)-Vealhurl-gerrymandering.wav}} ===={{Signifoj}}==== # {{k|en|F: politiko}} manipulado de elektodistriktoj por partia avantaĝo <ref>[https://aljazeera.com/news/longform/2026/5/19/how-the-shape-of-a-map-can-determine-the-us-midterm-elections aljazeera.com] klarigo kaj ludo</ref> #: {{vian|[[redistricting]]}} {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} {{Fontoj}} ca194bux7p777f6rc9wv4ll4ro8kycr 1475773 1475770 2026-09-06T13:34:31Z Taylor 49 4683 1475773 wikitext text/x-wiki == angla == === Substantivo === {{livs|en|SB|fra=[M:Gerry/gerry]+[M:salamander/(sala)mander]+[U:ing]}} {{Prononco}} * {{IFA|/ˈdʒɛ.ɹiˌmæn.də.ɹɪŋ/|/ˈɡɛ.ɹiˌmæn.də.ɹɪŋ/}} * {{aŭdo|LL-Q1860 (eng)-Vealhurl-gerrymandering.wav}} ===={{Signifoj}}==== # {{k|en|F: politiko}} manipulado de elektodistriktoj por partia avantaĝo <ref>[https://aljazeera.com/news/longform/2026/5/19/how-the-shape-of-a-map-can-determine-the-us-midterm-elections aljazeera.com] klarigo kaj ludo</ref> #: {{vian|[[redistricting]]}} {{Vortfaradoj}} {{vfvg|en}} {{Referencoj}} * {{vikipedenlin|ling=en}} * {{ref-onelook}} {{Fontoj}} tb3i92ufgbfyuzr5jv8gnh2uwog79dw -ing 0 271019 1475771 2026-09-06T13:29:04Z Taylor 49 4683 == angla == === Sufikso === {{livs|en|UF|ext=&U}} ===={{Signifoj}}==== # [[-ado]]; -umado; el verba aŭ substantiva radiko faras substantivon kies signifo estas la aktiveco #: [[box]] -> [[boxing]] #: [[stone]] -> [[stoning]] #:: [[ŝtono]] -> [[ŝtonumado]] {{Vortfaradoj}} {{vfvg|en|U}} {{Referencoj}} * {{ref-onelook}} 1475771 wikitext text/x-wiki == angla == === Sufikso === {{livs|en|UF|ext=&U}} ===={{Signifoj}}==== # [[-ado]]; -umado; el verba aŭ substantiva radiko faras substantivon kies signifo estas la aktiveco #: [[box]] -> [[boxing]] #: [[stone]] -> [[stoning]] #:: [[ŝtono]] -> [[ŝtonumado]] {{Vortfaradoj}} {{vfvg|en|U}} {{Referencoj}} * {{ref-onelook}} bk98gmisznftdxm79qg7za4lzyoou8a Kategorio:Vorto -en- enhavanta morfemon M (salamander) 14 271020 1475774 2026-09-06T13:34:50Z Taylor 49 4683 {{kat-farado}}{{kat-farado}}{{kat-farado}}{{kat-farado}}{{kat-farado}}{{kat-farado}}{{kat-farado}}{{kat-farado}}{{kat-farado}} 1475774 wikitext text/x-wiki {{kat-farado}} ckp99wa6kdw8068qt0clnwc8psce6k1 Kategorio:Amfibio (angla) 14 271021 1475775 2026-09-06T13:36:47Z Taylor 49 4683 {{eht}} [[Kategorio:Besto (angla)]] [[Kategorio:Amfibio laŭ lingvo|angla]]{{eht}} [[Kategorio:Besto (angla)]] [[Kategorio:Amfibio laŭ lingvo|angla]] 1475775 wikitext text/x-wiki {{eht}} [[Kategorio:Besto (angla)]] [[Kategorio:Amfibio laŭ lingvo|angla]] 5u0szi6dqjgnvk6btxpbo6jxhztzg2n