Module talk:User:Sarri.greek/stems

From Wiktionary, the free dictionary
Latest comment: 3 months ago by Sarri.greek in topic module usefulness
Jump to navigation Jump to search

tests

[edit]
  • {{#invoke:User:Sarri.greek/stems| |lemma= }}
    expected:
    =
  • {{#invoke:User:Sarri.greek/stems|word_minus_1end_i|lemma=δημοκρατία}} δημοκρατία
    expected: δημοκρατί
    = δημοκρατί
  • {{#invoke:User:Sarri.greek/stems|word_minus_1end_i|lemma=-ία}}
    =
    = -ί
  • {{#invoke:User:Sarri.greek/stems|word_minus_5end_i|lemma=δημοκρατία}}
    expected: δημοκ
    = δημοκ
  • {{#invoke:User:Sarri.greek/stems|word_minus_2end_i|lemma=-ία}}
    expected: -
    = -
  • {{#invoke:User:Sarri.greek/stems|word_minus_2end_i|lemma=α}}
    expected: ?? not possible
    =

minus hyphen

[edit]

For searches at Template:R:el:Reverse index I must cut off hyphens of affixes. Test them at PAGEs as PAGENAME too.

  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i|lemma=-ing}} for SUFFIXes
    expected: ing
    = ing
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i|-ing}} +at position#1
    expected: ing
    =
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i|lemma=αρχο-}} for PREFIXes
    expected: αρχο
    = αρχο
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i|lαρχο-}} at position#1
    expected: αρχο
    =
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i|lemma=-ο-}} for ΙΝFIXes
    expected: ο
    = ο
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i|lemma=μέτρο}} control
    expected: μέτρο, no change
    = μέτρο
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen_i}} control PAGENAME
    expected: our pagename with no change
    =

Use the other one, for Templates

  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen}} control PAGENAME
    expected: our pagename with no change
    = User:Sarri.greek/stems
  • {{#invoke:User:Sarri.greek/stems|word_minus_hyphen|lemma=-ing}} for SUFFIXes
    expected: ing
    = User:Sarri.greek/stems

module usefulness

[edit]

@Sarri.greek Hi. I would recommend doing the inflection entirely in Lua if possible, and in that case you don't need a module like this because the operations in question are just one line of code (and highly specific to the particular language and inflection class). Benwing2 (talk) 05:13, 4 March 2024 (UTC)Reply

Sorry, Sir, @Benwing2, I do not understand very much: you mean: no Templates should be used? ‑‑Sarri.greek  I 05:16, 4 March 2024 (UTC)Reply
@Sarri.greek Yes. The only use of the template is as a wrapper around the Lua module. This is how the Ancient Greek inflection modules are implemented; see Module:grc-decl for example. (Note that these modules are necessarily a bit complex because Ancient Greek inflection is very complex.) Benwing2 (talk) 05:18, 4 March 2024 (UTC)Reply
Ok!, @Benwing2. The next step (for grk) is: take the result (stem = stem as it appears in PAGENAME) and create a) stem0 = strip from any diacritics b) stem1 = put accent at last syllable c) stem2 = put accent at the 2nd syllable from end, d) stem3 = put accent at 3rd syllable from end. How these are used in any kind of Greek, is irrelevant. It works for all (ancient, koine, medieval, modern). Like at wikt:el:Module:grk-stems. The idea is, to make a very easy way to make inflectional types. By 'very easy', I mean that any person who knows nothing about Lua, can SEE and call the stems in any language. (I shall try to make empty tables-to-fill-in). Just a test. ‑‑Sarri.greek  I 05:33, 4 March 2024 (UTC)Reply
@Sarri.greek IMO the result will be too complicated and hard to understand if you use a combination of Lua and template code, given the complexities of Greek inflection. However, you are welcome to create tests for this purpose. Benwing2 (talk) 05:46, 4 March 2024 (UTC)Reply

Thank you @Benwing2 This is NOT intended for Ancient. I can see the Module:grc-decl/decl/data and Module:grc-decl/decl/staticdata/paradigms and accent-rules at some other module, trying to sum up the totality of Grammar in one module :) how impressive. But an expert philologist who does not know Lua, cannot possibly make corrections or additions, not knowing where the stems lie, which words are inflected in this way, are there any exceptions, etc. For Medieval, Modern etc, things could be simpler, by making things visible. I shall try grk-stems, but probably, it would need help, because I understand that en.wikt uses Unicode and some 'tokenize' function.It is not going to be complicated. For example:

  • nominative sing. param ns = stem ... "α"
  • genitive plural gp = stem0 ... "blah" and so on. This is the declension called 'σοφία' or some other name.

I would not change Anything at existing templates or modules. Example Template:el-decl-noun and Template:el-nF-α-ες-2b. It is just an experimentation. Perhaps for the future, so that editors will not have to WRITE stem-variations. ‑‑Sarri.greek  I 06:07, 4 March 2024 (UTC)Reply