Jump to content

Wikifunctions:WikiProject Wiktionary functions/Conjugation table

From Wikifunctions

Description

This function should output the conjugation table of the given lexeme with the labels in the given language. The prototype for this function is Latin first declension table (Z26333), except that the lexeme is given as a Wikidata Lexeme (so that we can exploit the informations of Wikidata) instead of a string.

Inputs

Output

HTML fragment (Z89)

Example

Input: bello (L43226), English (Z1002)

Output:

MasculineFeminine
Singular bellobella
Plural bellibelle

Details

The caption is not present, since it's not a fundamental component of the table, and it would be very difficult to localize.

Proposed implementation

This function could delegate the execution to other functions, depending on the language of the lexeme. These function could once again delegate the execution to functions specialized by the lexical category or other relevant grammatical features.

The table should have the class wikitable. For the creation of simple tables, create wikitable with columns and rows headers (Z27878) could be useful, but it can't generate more complex tables.

Similar to Latin first declension table, crude composition (Z27882), the labels should be genereted calling name for table header (Z27885).

All the text in a language different from the format language should be enclosed in a <span lang="..."> tag.

Useful helper functions

Comments

  • I'm not completely sure about the caption part: it could be very useful, but for now I haven't inserted it in the proposal because it's actually very difficult to implement. Dv103 (talk) 10:08, 6 September 2025 (UTC)[reply]
  • Just noting that for some languages with few conjugations, like Swedish, the lexemes on Wikidata usually have forms for all conjugations already, and it is mostly an exercise of sorting them by grammatical features, but for other languages, depending on regularity, it might be easier (and possibly even better) to generate the forms with other functions "on-the-fly". Ainali (talk) 14:25, 27 September 2025 (UTC)[reply]