Module:pi-decl/noun/documentation

Wiktionary වෙතින්

Purpose[සංස්කරණය]

This module provides inflection tables for Pali for nouns, adjectives and pronouns. For pronouns, one currently uses the interface for nouns, while for adjectives one uses separate invocations for each gender.

Some functions are exported from this module to service the testing of noun inflection. The module also provides utility functions for the conjugation of verbs.

Normal Use[සංස්කරණය]

The normal way to use this module is to invoke the template {{pi-decl-noun}}, which see for the interface. This invokes the exported function show.

Data tables[සංස්කරණය]

The primary data table for the inflections is the data module Module:pi-decl/noun/Latn, which contains the Latin script tables. These are supplemented by identically structured tables for each of the other supported scripts. If the table for a particular paradigm is missing from one of these, the table will be generated using the transliteration functions in Module:pi-Latn-translit. The data modules for the other scripts are:

With the exception of the masculine and neuter thematic nouns, the Thai and Lao tables are not used for declension with explicit vowels.

There is no such redundant table for the Chakma script.


Deliberately Exported Functions[සංස්කරණය]

The following Lua functions are exported by this module:

  • orJoin()
  • joinSuffix
  • arrcat_nodup
  • present
  • show

Function orJoin[සංස්කරණය]

Function joinSuffix[සංස්කරණය]

The original idea was to share this function with the code for verb conjugation. However, the conjugation of verbs in the Thai and Lao scripts is more complicated, and there is therefore a more general function in use for verbs.

Function arrcat_nodup[සංස්කරණය]

Function present()[සංස්කරණය]

Function show()[සංස්කරණය]

Other exported functions[සංස්කරණය]

  • detectEnding()
  • joinSuffixes
  • getSuffixes
  • modify

Algorithm[සංස්කරණය]

The paradigm to use is determined using the script of the stem, the ending of the stem (for which there are a few conventional values - see {{pi-decl-noun}}) and gender of the stem. The script is always deduced from the script of the stem, while the ending may be supplied explicitly (in Latin script) or deduced from the stem. The gender is always supplied explicitly. The deduction of the ending from the stem is performed by function detectEnding.

The set of suffixes is obtained by function getSuffixes. This first attempts to load the paradigm from the data files. However, if the paradigm is unacceptable or missing, it will generate it itself. Paradigms from data files are only acceptable for some combinations of settings. At present, they are not acceptable for non-Roman scripts when using explicit vowels, except for the conventional ending 'ah', which denotes masculine or neuter nouns with stems in explicit -a. (The convention was chosen because the explicit vowel also represents the Sanskrit ending -aḥ.)

When paradigms are generated internally, they are converted from Latin script to the required script and implicit vowel settings. This is implemented in function convert_suffixes.

The second stage of the generation, applicable to the Lao script only, is to, where needed, convert the ablative and instrumental plural in -bhi to the correct forms. The editor specifies the correct form using the parameter |liap=.

The third stage of the generation, applicable to Lao script only, is to, where needed, convert the letter corresponding to <y> in the suffixes to the correct letter. This setting is treated as orthogonal to the choice between using or not using implicit vowels.

The endings are then attached to the stem using the function joinSuffixes. This invokes function joinSuffixes to apply the writing system-dependent rules for the attachment of suffixes. There is one user-controlled input to this process, the parameter |aa=, which is applicable to the Burmes and Tai Tham scripts.

Next, the function modify is applied to add, remove or replace the forms generated so far in accordance a list of modifications included in the invocation of {{pi-decl-noun}}.

Finally, the function present formats the list of forms for each combination of case and number. This formatting includes adding the transliteration, which is done in function orJoin. Function show then returns the inflection table for display on the page.


"https://si.wiktionary.org/w/index.php?title=Module:pi-decl/noun/documentation&oldid=36280" වෙතින් සම්ප්‍රවේශනය කෙරිණි