Template:ar-decl-adj/documentation

This template displays an inflection table for Arabic adjectives. The parameters are largely the same as for the headword template, and in general it is possible to copy such a template, change its name to , and get an appropriate declension table -- provided that the masculine plural is specified appropriately, or that the adjective is of a sort that uses a sound masculine plural (e.g. participles of non-form-I verbs and some form-I participles).

See also.

Parameters

 * 1
 * The stem used in the masculine singular, including vowels. Can optionally be of the form 'STEM:TYPE' with an explicitly specified inflection type (see below); otherwise the inflection type is inferred from the form of the stem. Can also be 'STEM/TR' or 'STEM/TR:TYPE' with manual transliteration supplied (note that manual transliteration can also be specified using separate parameters, as with headword templates like ). Can be "-" to suppress the masculine singular.


 * head2, head3, ...
 * Additional masculine singular stems.


 * tr, tr2, tr3, ...
 * Alternative way to specify manual transliteration for 1, head2, head3, ..., respectively, instead of using the 'STEM/TR' specification. Provided for compatibility with headword templates.


 * f, f2, ...
 * The stem(s) used in the feminine singular, including vowels. Normally unnecessary; if omitted, the feminine singular will be inferred from the masculine singular (equivalent to specifying f). Can be of the form 'STEM' (inflection type inferred), 'STEM:TYPE' (with an explicitly specified inflection type, as above), or 'TYPE' (feminine singular stem inferred from inflection type and masculine singular stem; only works for 'f', 'rf', 'intf', 'cdf', 'elf'). Can also be 'STEM/TR' or 'STEM/TR:TYPE' with manual transliteration supplied. Can be "-" to suppress the feminine.


 * ftr, f2tr, ...
 * Alternative way to specify manual transliteration for f, f2, ..., respectively, instead of using the 'STEM/TR' specification. Provided for compatibility with headword templates. Similar parameters are available for plurals and duals.


 * pl, pl2, ...
 * The stem(s) used in the masculine plural, including vowels. If omitted, equivalent to specifying p; i.e. defaults to being unknown, except for color-defect adjectives, where the plural can automatically be determined. To specify a strong plural (as for derived participles), use sp. Has the same allowed forms as for the feminine singular.


 * fpl, fpl2, ...
 * The stem(s) used in the feminine plural, including vowels. Normally unnecessary; if omitted, inferred from the feminine singular (equivalent to specifying sp). Has the same allowed forms as for the feminine singular.


 * cpl, cpl2, ...
 * The stem(s) used in the masculine and feminine plural, including vowels. Equivalent to specifying both pl and fpl with the same value. Can be freely mixed with pl and fpl and will be listed after them. Has the same allowed forms as for the feminine singular.


 * d, d2, ...
 * The stem(s) used in the masculine dual, including vowels. Normally unnecessary; if omitted, inferred from the masculine singular (equivalent to specifying d). Has the same allowed forms as for the feminine singular.


 * fd, fd2, ...
 * The stem(s) used in the feminine dual, including vowels. Normally unnecessary; if omitted, inferred from the feminine singular (equivalent to specifying d). Has the same allowed forms as for the feminine singular.


 * number
 * Explicitly control which numbers appear. The value is a comma-separated list of one or more of sg, du, pl. By default, all numbers appear.


 * state
 * Explicitly control which states appear. The value is a comma-separated list of one or more of ind (indefinite) or def (definite); the value con (construct), possible for nouns, doesn't apply to adjectives (although it does apply to gendered nouns and numerals, which otherwise use the same parameters as adjectives). By default, all states appear. Currently, non-"appearing" states are displayed with a dash in place of the appropriate declension members instead of not appearing at all.


 * basestate
 * Override the morphological state. This is mostly used with proper nouns. The value is one of ind or def (con doesn't apply to adjectives, although it does apply to gendered nouns and numerals, which otherwise use the same parameters as adjectives).


 * omitarticle
 * If specified, omit the definite article that is otherwise automatically added in the definite state.


 * nom_m_sg_ind, nom_m_sg_def, nom_m_sg_con, ...
 * Override particular forms. The param name is a combination of case ( where   is the informal form), gender, number  and state . The value can have semicolons or commas (or Arabic equivalents) to separate distinct stems and a vertical bar to separate alternative spellings for a given stem (typically different possible hamza seats). Manual transliterations can be specified using the 'STEM/TR' form (no alternative parameters are provided in this case for manual translits). When overrides are specified, the page will be placed in a category indicating irregular declension such as Category:Arabic irregular adjectives (or Category:Arabic irregular numerals, etc. depending on the part of speech), unless noirreg is given a value.


 * lemma
 * Override the lemma (displayed at the head of the declension table).


 * noirreg
 * If specified, don't place the page in an irregular-declension category when overrides are specified.


 * pos
 * Override the part of speech (displayed at the head of the declension table).


 * mod,modhead2,modhead3,...; modf,modf2,...; modpl,modpl2,...; modfpl,modfpl2,...; modd,modd2,...; modfd,modfd2,...; etc. Also idafa. Also modstate, modcase, modnumgen, and modtr,modtr2,...; modftr,modf2tr,...; etc.
 * Specify another word that is declined separately as a modifier. See, except that modnumgen is used to restrict both number and gender, typically m_sg.


 * mod2,mod2head2,mod2head3,...; mod2f,mod2f2,...; mod2pl,mod2pl2,...; mod2fpl,mod2fpl2,...; mod2d,mod2d2,...; mod2fd,mod2fd2,...; etc. Also idafa2. Also mod2state, mod2tr, etc.
 * Specify a second modifying word. See . Similarly, a third modifying word, etc. can be specified using mod3 and derivatives, up to mod9.

Inflection types

 * Regular triptote.
 * Regular triptote.


 * Regular diptote.
 * Regular diptote.


 * Form ending in -in, such as final-weak active participles. This automatically selects the "triptote" or "diptote" variant according to the number (singular or plural) and form of the adjective.
 * Form ending in -in, such as final-weak active participles. This automatically selects the "triptote" or "diptote" variant according to the number (singular or plural) and form of the adjective.


 * Form ending in -in, forcing the "triptote" variant (with indefinite accusative in -iyan). Rarely needed for adjectives.
 * Form ending in -in, forcing the "triptote" variant (with indefinite accusative in -iyan). Rarely needed for adjectives.


 * Form ending in -in, forcing the "diptote" variant (with indefinite accusative in -iya). Rarely needed for adjectives. See for a discussion of the singular and plural -in variants in nouns.
 * Form ending in -in, forcing the "diptote" variant (with indefinite accusative in -iya). Rarely needed for adjectives. See for a discussion of the singular and plural -in variants in nouns.


 * Invariable declension ending in alif or alif maqṣūra. Such words will have feminine plurals in -ayāt and duals in -ayān.
 * Invariable declension ending in alif or alif maqṣūra. Such words will have feminine plurals in -ayāt and duals in -ayān.


 * Invariable declension, loanword-type. Always ends in tall alif. Such words will have feminine plurals in -āt and duals in -atān, as if the alif was a tāʾ marbūṭa.
 * Invariable declension, loanword-type. Always ends in tall alif. Such words will have feminine plurals in -āt and duals in -atān, as if the alif was a tāʾ marbūṭa.


 * Forms ending in -an, such as final-weak passive participles.
 * Forms ending in -an, such as final-weak passive participles.


 * Elative adjective. Same as di but causes the feminine to be inferred as type elf.
 * Elative adjective. Same as di but causes the feminine to be inferred as type elf.


 * Color-defect adjective. Same as di but causes the feminine to be inferred as type cdf and plural to be inferred as type cdp.
 * Color-defect adjective. Same as di but causes the feminine to be inferred as type cdf and plural to be inferred as type cdp.


 * Regular feminine in -a.
 * Regular feminine in -a.


 * Intensive feminine, e.g. to masculine.
 * Intensive feminine, e.g. to masculine.


 * Elative feminine, e.g. to masculine.
 * Elative feminine, e.g. to masculine.


 * Color-defect feminine, e.g. to masculine.
 * Color-defect feminine, e.g. to masculine.


 * Select the appropriate feminine form. Equivalent to elp if the masculine is of type el; cdp if the masculine is of type cd; intf if the masculine is of the form of an intensive adjective, such as or ; else rf.
 * Select the appropriate feminine form. Equivalent to elp if the masculine is of type el; cdp if the masculine is of type cd; intf if the masculine is of the form of an intensive adjective, such as or ; else rf.


 * Sound masculine plural in -ūn(a)/-īn(a).
 * Sound masculine plural in -ūn(a)/-īn(a).


 * Sound feminine plural in -āt-.
 * Sound feminine plural in -āt-.


 * Plural ending in -awn(a), esp. of adjectives, such as plural of.
 * Plural ending in -awn(a), esp. of adjectives, such as plural of.


 * Color-defect adjective plural.
 * Color-defect adjective plural.


 * Select the appropriate plural form if known (currently only if the singular is of type cd, in which case it is equivalent to cdp); else, equivalent to type ?.
 * Select the appropriate plural form if known (currently only if the singular is of type cd, in which case it is equivalent to cdp); else, equivalent to type ?.


 * Select the appropriate plural form if known, else a strong plural. Equivalent to cdp if the singular is of type cd; else sfp for feminines, awnp for masculines if the singular is of type an, smp for other masculines.
 * Select the appropriate plural form if known, else a strong plural. Equivalent to cdp if the singular is of type cd; else sfp for feminines, awnp for masculines if the singular is of type an, smp for other masculines.


 * Select the appropriate dual form.
 * Select the appropriate dual form.


 * Indicate that the declension is unknown. All inflections will appear as question marks.
 * Indicate that the declension is unknown. All inflections will appear as question marks.

A simple example
For participles, nisbas and similar adjectives that take sound plurals, it is enough to simply specify a single stem, e.g. for the adjective, a simple declaration works:

This yields

A more complex example
For more complex examples, generally it is sufficient to copy the headword declaration for an adjective and make minor changes, mostly just changing the template name from  to. For example, for the adjective, the headword is declared as follows:

Just changing the template name yields the correct declension template:

This produces

Note that the code automatically figures out the is a diptote, and correctly infers the declension of all the other forms. Generally the code is quite good at doing this.

Nisba adjectives
Although nisba adjectives use a special template to produce the headword line, they behave like participles, and the normal adjective declension template works fine.

For example, for, the headword template is as follows:

It is easily converted to a declension template:

This produces

This works when the plural is overridden, as well, e.g. for, the headword template is as follows:

It is easily converted to a declension template just by changing the template name:

This produces

Color/defect adjectives
Color/defect adjectives typically have a particular format for the feminine and common plural, e.g. for :

There is also a special declension class for them, which automatically conjugates the feminine and plural correctly:

This produces:

When the plural needs to be overridden, that can be done, e.g. for :

producing

Note that both the masculine and feminine singular are diptotes. The  annotation gets this correct, but the code would also get this correct if the forms were explicitly specified, e.g. using

because and  have a shape that is recognizable as a diptote.

Irregular adjectives
Irregular adjectives can be specified using annotations and overrides, as necessary.

Irregular example 1
One complex example is the demonstrative pronoun, which logically exists only in the definite state, but which doesn't have the definite article attached to it.

Its declension can be specified as follows:

yielding

This is actually fairly straightforward. Except in the dual, the forms are invariable for case, and this is specified using the  annotation to put the words in the invariable declension. (Words in this declension normally end in or, but that is not a requirement of the declension.) The state is restricted to definite, and yes is given so that the article won't be attached automatically to the forms given. We also override the part of speech displayed next to the lemma so it says "determiner" instead of "adjective".

Irregular example 2
Slightly more complicated is the corresponding demonstrative pronoun. For this demonstrative, the dual declension is irregular, with an extra morpheme attached to the end of all forms. As a result, overrides are needed to specify the declension, requiring a more complex specification:

Here the dual forms need to be specified using overrides because of their irregularity. Furthermore, the plural has an irregular transliteration, where the first vowel is written long but pronounced short; as a result, the transliteration needs to be given manually. Other than these complications, the specification is similar to.

This produces