Jump to content

Module:grc-decl/documentation

From Wiktionary, the free dictionary

This module is the backend to {{grc-decl}} and {{grc-adecl}}. It was created by ObsequiousNewt and then restructured by JohnC5 and Erutuon.

Odds and ends

[edit]

The module tracks uses of {{grc-decl}} and {{grc-adecl}} in which parameter 1 does not have an accent mark using the tracking template grc-decl/no accent. Irregular and indeclinable paradigms are excluded from this check.

The module adds a breve or macron to mark the length of the monophthongs α, ι, υ (a, i, u) if they do not bear a macron, breve, circumflex, or iota subscript and the length can be deduced from the rules of accent. Thus, {{grc-decl|ἄστρον|ἄστρου}} generates the same forms as {{grc-decl|ᾰ̓́στρον|ᾰ̓́στρου}}. This is done by the mark_implied_length and harmonize_length functions in Module:grc-accent.

Nominative and genitive, masculine and feminine, or masculine and neuter endings containing the monophthongs α, ι, υ (a, i, u) need not be marked with macrons and breves if there is only one declension with the given endings when vowel length is ignored. Thus {{grc-decl|νεανίας|ου}} is fine because the only declension pattern with the endings -ας, -ου (-as, -ou) is -ᾱς, -ου (-ās, -ou), but {{grc-decl|αἰτία|ας}} will throw an error, because both -ᾰ, -ᾱς (-a, -ās) and -ᾱ, -ᾱς (-ā, -ās) are possible. This feature is made possible by Module:grc-decl/decl/staticdata.

Submodules

[edit]

Module:grc-decl/decl contains functions that determine the declension class, generate the inflected forms, and retrieves the correct forms of the article.

Module:grc-decl/table generates the table using the inflected forms, the forms of the article (if any), and the dialect and |titleapp= parameters.

Module:grc-decl/params contains the lists of parameters used by {{grc-decl}} and {{grc-adecl}}.

Module:grc-decl/decl/data contains functions that return the forms of a given declension type, modifying the raw paradigms or the stems as necessary.

Module:grc-decl/decl/staticdata generates data that is copied to Module:grc-decl/decl/classes and used to determine the declension class based on the nominative and genitive (for nouns) or the masculine and feminine or neuter (for adjectives).

Module:grc-decl/decl/staticdata/paradigms contains raw paradigms for declension classes, as well as any variations with a different accent on the ending.

Module:grc-decl/decl/staticdata/dialects contains data for dialect groups.

Testcases

[edit]