Accelerated infected form generations for Russian?

Accelerated infected form generations for Russian?

Hi,

I wonder if you could help me with this. What needs to happen if I want to be able to create inflected forms for Russian (or other language) like I did with German Internetzugangs (genitive case) - just clicking on the red link or the way English plural can be created?

Anatoli (обсудить/вклад)01:01, 3 April 2013

There is a script called User:Conrad.Irwin/creation.js which does this. But I don't really understand all the details of how it works. It wasn't written in a way that allows editors to easily change the way it works or add new things to it. I would like someone to fix it somehow, but... people have other things to do I guess.

CodeCat01:09, 3 April 2013

Thank you, at least I know which script does it.

Anatoli (обсудить/вклад)01:29, 3 April 2013

I don't see much handling for German, though (no 'de' string) but it works for German. Is there anything else?

Anatoli (обсудить/вклад)01:32, 3 April 2013

It works by reading a span tag that has certain classes in it like form-of, genitive-form-of and such. I think one of those is the language.

CodeCat01:37, 3 April 2013

You lost me there. What's the difference between Russian задание (zadanije) and German Aufgabe? Are the entries generated from inflection tables or from the header only? Russian задание (zadanije) has nom. pl. displayed for plural, is that why it's not working?

Anatoli (обсудить/вклад)02:10, 3 April 2013

Template:de-noun applies a span tag to the forms it generates, e.g. span class="form-of genitive-form-of lang-de". If you edited the Russian templates to make them enclose the forms they generate in similar spans, Conrad's script would probably pick up on and allow accelerated creation of the inflected forms at that point.

- -sche (discuss)02:25, 3 April 2013

Thank you, -sche. Russian and German templates are very different, there are a lot of forms and transliteration for each form. I'm afraid I won't be able to change it myself without breaking.

Anatoli (обсудить/вклад)02:38, 3 April 2013

It shouldn't be too hard to add spans. For example, make this change, and the template will allow the creation of entries like [[собаки]]. But if you want separate definition lines in [[собаки]] to indicate that it is both the genitive singular and the nominative plural, that may prove trickier.

- -sche (discuss)02:54, 3 April 2013

You have "...form-of genitive-form..." there but you're modifying the plural form ("[[plural|pl.]]" on the same line). Not sure I understand. Will be happy if I can just generate plural nominative forms for nouns now. Could you double-check your code, please?

I noticed your собаки. It's good! Did you create it from собака or your own Sandbox? Which link did you click on собака? Well, I don't know how people go about when one form can be genitive, plural, etc. of the same word. Your help we'll be appreciated. As I said, perhaps generating plural forms this way would be great for now.

Anatoli (обсудить/вклад)04:13, 3 April 2013

I created собаки by temporarily switching собака to use User:-sche/ru rather than Template:ru-noun. That doesn't show up in собака's edit history, because I found that I didn't even need to save my changes to собака, I just had to click "preview" and Conrad's ACCEL picked up on it. To enable ACCEL creation more broadly, you'll want to edit Template:ru-noun, so that you can just click on the links in the lemma entries without having to edit them (except at first, when you might have to make null edits, until all the caches update).

As for "genitive-form" being on the same line as "[[plural|pl.]]": I simply enclosed all instances of {{gen}}, the code which generates the genitive form, in the "form-of genitive-form" span. It so happens that—while a little extra code does allow for cases where the gen and pl differ, and in those cases ACCEL creation of the plural could be enabled by another span—in most cases, the template just labels the genitive "gen. sg. & nom. pl." and doesn't take the plural as a parameter.

AFAICT, the only way to get accelerated creation of plural forms is to (1) rewrite the template so that the plural form is specified in entries, and displayed by the template, as a separate parameter or (2) write specialised .js that figures out when a Russian noun has not been declared to have a plural different from its genitive, and that, in such cases, offers a "green link" to a page with both "genitive of" and "plural of" lines.

- -sche (discuss)20:13, 3 April 2013

The current template has pl and pltr (translit.) for plural. Plural form may match other cases, not just genitive. It all seems very complicated but are you able to rewrite the Template:ru-noun so that clicking on the plural form (don't worry about other cases for now, providing just one case in the template is not really helpful) is accelerated (like it is for English, etc.)? It's OK if plural coincides with other cases, this can be done manually or not at all. So if собаки only had "nominative plural of собака", it's not incorrect. I saw that you experimented but it didn't work, did it?

Anatoli (обсудить/вклад)22:47, 3 April 2013

Hmm, Template:ru-noun is more complicated that I thought: собака contains gen=собаки|gentr=sobáki|pl=собаки|pltr=sobáki but displays "gen. sg. & nom. pl. собаки (sobáki)". If someone could figure out how to update Conrad's script to handle the precise templates Russian uses, accelerated creation of plural forms when they are displayed separately (as on сердце) could be enabled, but when they are suppressed (as on собака, which displays only the text that was set as the genitive), I don't see how ACCEL can be made to pick up on them, or what ACCEL could link / what humans could click on. Unfortunately, Conrad's script and {{ru-noun}} are both quite complex, and I don't have time at the moment to learn enough about them to be able to make a major edit to either. We should move this discussion to the Grease Pit, where other editors might be able to help out.

- -sche (discuss)01:58, 4 April 2013

Thank you for trying. Maybe someone will help or I will request on GP.

Anatoli (обсудить/вклад)02:16, 4 April 2013