Jump to content

Wikifunctions:Type proposals/French tenses

From Wikifunctions

Why?

For the eventual plans to use Wikifunctions to power Abstract Wikipedia, having functions to conjugate French verbs (or groups of verbs, like regular -er verbs) are very important.

The conjugation for a verb depends on several factors, but one of them is the tense in which the sentence is written. The French language has 22 tenses.

Currently, I've implemented a conjugation function, Conjugate être (Z21599) (for être, the verb "to be", which has unique conjugation), which requires you to type the tense you want in as a string. It currently only supports 3 tenses (type "past" for Passé composé, type "present" for Présent and type "future" for Futur simple). [UPDATE: I've now migrated it to take natural numbers in the format described here, but an actual dropdown type would be better].

It would be great to just have an enum-like type for use in the conjugation functions, which provides a dropdown list of all the French tenses for you to select from when using the function.

Structure

An enum, with 22 different values. The key used are natural numbers.

Values

  1. Présent
  2. Passé composé
  3. Imparfait
  4. Plus-que-parfait
  5. Futur simple
  6. Futur antérieur
  7. Passé simple
  8. Passé antérieur
  9. Présent du subjonctif
  10. Passé du subjonctif
  11. Imparfait du subjonctif
  12. Plus-que-parfait du subjonctif
  13. Présent du conditionnel
  14. Passé du conditionnel
  15. Présent de l'impératif
  16. Passé de l'impératif
  17. Présent de l'infinitif
  18. Passé de l'infinitif
  19. Présent du participe
  20. Passé du participe
  21. Présent du gérondif
  22. Passé du gérondif

Example values

{
    "type": "French tense",
    "value": "Futur simple"
}
{
  "Z1K1": "Znnnnn",
  "ZnnnnnK1": "Zmmmmm"
}

Validator

Ensures that the value is a valid French tense (a number from 1 to 22).

Identity

Tenses are equal if they have the same ZID.

Converting to code

In both Python and JS, it will be considered a number.

Renderer

Display the label associated with the tense. In all languages it should show the French name for the tense, as even in English or other languages we still call it be by the French name when learning/teaching French. It should not be marked for translation.

Discussion and !votes