Module talk:User:Victar/iir-decl-noun

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

@KarikaSlayer I'm trying to destress the declension suffixes when there is stress on the stem. You know this module better than I do, it being based on the PGmc one. Where should I be applying this? --Victar (talk) 18:02, 1 September 2017 (UTC)

@Victar For the thematic stems at least, the easiest way would be to make decl_data["á-m"] ["á-n"] ["áH-f"] with the stressed endings and have the current a-m a-n aH-f be for unstressed endings. For athematic stems, probably something similar (one decl_data entry per inflection per accent paradigm) could be done. KarikaSlayer (talk) 19:38, 1 September 2017 (UTC)
@KarikaSlayer: Hmm, well, right now I have a destress() gsub function based on the one in Module:ine-common and:
local stem_stressed = false
if mw.ustring.gmatch(stem, "[áíĺḿńŕúā́]") then stem_stressed = true end
So what I need is a place to put if stem_stressed then destress(data.forms[i]) end --Victar (talk) 20:18, 1 September 2017 (UTC)
@Victar: I'm pretty sure destress(data.forms[i]) would destress the stem too. You'd have to add it where the ending is added (e.g. args[1] .. (args.stem_stressed and "ás" or "as")) KarikaSlayer (talk) 20:48, 1 September 2017 (UTC)
@KarikaSlayer: Right, so that's what I'm asking. =) Where specifically can I add it to in that would only affect the declension suffix? --Victar (talk) 22:09, 1 September 2017 (UTC)
@Victar: You'll have to pass each inflectional ending string in the decl_data functions to destress(), e.g. data.forms["nom_sg"] = {args[1] .. destress_if_stressed("ás", args.stem_stressed)}
and then
function destress_if_stressed(ending, stem_stressed)
if stem_stressed then
-- destress() code goes here
end
end
KarikaSlayer (talk) 22:50, 1 September 2017 (UTC)
Thanks @KarikaSlayer:. I'm having the problem now though that it's de-stressing all endings, ex. *yugám. Could you have a look at it when you have a moment? --Victar (talk) 22:23, 2 September 2017 (UTC)
@Victar: Should be fixed now. Apparently it thought the thematic vowel was part of the stem. KarikaSlayer (talk) 23:24, 2 September 2017 (UTC)
@KarikaSlayer: Hey, hey, thanks! --Victar (talk) 23:27, 2 September 2017 (UTC)

Identical nominative ending[edit]

@KarikaSlayer The masc and fem i-stems have the same nominative ending. I'd like it to default to masc and only require people to add |g=f if it's fem. Is that possible with the current coding, or do I need to pass gender to /data? Thanks. --Victar (talk) 00:23, 7 September 2017 (UTC)

I figured it out. Thanks though. --Victar (talk) 02:41, 7 September 2017 (UTC)

Collapsible table[edit]

Hi @Erutuon, I'm trying to collapse the vocative and instrumental-locative rows like done in done in Module:ine-nominals. I tried something like (index == 1 or index == 7) and "class=\"vsShow\"" or "class=\"vsHide\"", but no luck. If you have a second, could you have a look? --Victar (talk) 17:51, 8 November 2018 (UTC)

@Victar: Probably what's causing problems with this is operator precedence: concatenation (..) has higher precedence than and or or, so prefix .. x and a or b .. suffix is parsed as ((prefix .. x) and a) or (b .. suffix). You want parentheses around x and a or b: prefix .. (x and a or b) .. suffix. — Eru·tuon 18:57, 8 November 2018 (UTC)
Thanks, @Erutuon, that did the trick! --Victar (talk) 05:08, 9 November 2018 (UTC)