Module talk:accel

Comparative and superlative adjectives
Since the script currently (as far as I am aware) uses the headings to find the part-of-speech for deciding the part-of-speech of accelerated entries, it doesn't work for the new format of comparative or superlative adjectives, since they still have "Adjective" as the heading. Would it be possible to instead possibly check the head template or similar of the existing entry for finding the part-of-speech? I could look at it myself as well. &mdash; surjection &lang;?&rang; 15:50, 10 January 2019 (UTC)
 * My solution for Ancient Greek was adding a parameter to to specify that an adjective was a comparative or superlative and then adding   or   to the form-of acceleration parameter.
 * The JavaScript compiles the acceleration parameters, and it can only look at stuff in the HTML and JavaScript. I think there is nothing in the HTML of the headword template to indicate that the word is a comparative. There is the  variable available in the   object and it would be possible to determine that the page is in a category containing the name of the current language and "comparative adjectives" or "superlative adjectives", but there is no way to determine which links actually belong to the comparative or superlative and which might belong to another part of speech. Even if the closest part-of-speech header to a link is "Adjective", there could be a page with both a positive adjective and a comparative adjective.
 * You could try my solution. The only way I could see the headword line being helpful is if something were added to the HTML to indicate what POS categories were added. But it is somewhat clearer to have the "comparative" or "superlative" information in the HTML around individual links. — Eru·tuon 22:33, 10 January 2019 (UTC)
 * Right, that will require something language-by-language which needs to be handled separately. I'll try to come up with something for Finnish at least. &mdash; surjection &lang;?&rang; 22:39, 10 January 2019 (UTC)
 * But wait, if that is the case, how does the script/module get the PoS heading, or does it not try to at all and am I just mistaken? &mdash; surjection &lang;?&rang; 22:49, 10 January 2019 (UTC)
 * I don't quite understand. The script does get the part of speech from the header, as you said. — Eru·tuon 23:04, 10 January 2019 (UTC)
 * It gets the header, so why couldn't it just read the line below that? It might have some other template than sure, but that's language-specific and should be handled in the language-specific modules. &mdash; surjection &lang;?&rang; 08:58, 11 January 2019 (UTC)
 * Like I said, there's nothing about "comparative" or "superlative" in the actual HTML of the headword that the JavaScript has access to. — Eru·tuon 09:19, 11 January 2019 (UTC)

Merging headwords
In the case of Slovene, most forms of the imperative have more than one form, but the difference is only in the accentuation, which is not a part of normal Slovene orthography. If these forms were created with acceleration, you'd end up with two  headers on the page, one with the headword  and another with. In the case of, there is a present-tense form that matches one of the imperatives, so it would be grouped under the heading, leaving the second imperative  by itself.

In the case of, it would be useful if both imperative forms were grouped under a single heading, with. This could be done relatively simply by making another merging function that handles cases where all but the headwords are the same. But I'm not sure how this should interact with the existing definition-merging code. There is a choice to be made: group the first imperative with the present-tense form (thus merging the definitions), or with the second imperative  (thus merging the headwords)? Which should take precedence? I'm leaning towards merging the headwords in this case. But one could imagine more complicated cases where both the headword and the definition can be merged, and I don't think this would work out of the box. —Rua (mew) 08:56, 12 July 2019 (UTC)
 * I'm partial to merging headwords so that definitions aren't duplicated. It seems closer to what we do when it's a lemma. — Eru·tuon 17:56, 12 July 2019 (UTC)
 * Perhaps  and   could be conceptually arrays, so that multiple headwords can be specified in the acceleration data and the acceleration script doesn't have to figure out how to merge the entries. Not sure if that makes sense though. — Eru·tuon 18:37, 12 July 2019 (UTC)
 * It would be easier if the template/module writer doesn't have to think of that, and can just trust that the gadget will do the right thing. —Rua (mew) 18:50, 12 July 2019 (UTC)
 * Yeah, you're right. The acceleration for one spelling should not have to contain the other spelling. It would be annoying and bad design. — Eru·tuon 04:48, 13 July 2019 (UTC)