Jump to content

Module:az-last-vowel/documentation

From Wiktionary, the free dictionary
Documentation for Module:az-last-vowel. [edit]
This page contains usage information, categories, interwiki links and other content describing the module.

This module helps you retrieve the last vowel in an Azerbaijani word, which is necessary for maintaining the vowel harmony.

Vowels in Azerbaijani

[edit]

There are 9 vowels in Azerbaijani: a, e, ə, ı, i, o, ö, u, and ü.

As some Azerbaijani suffixes have multiple forms, the last vowel plays a key role when appending suffixes to words. For example, the genitive case suffix, -ın has 4 different forms: -ın, -in, -un, and -ün, and which one to use depends on the last vowel of the lemma. You can read more about it in Module:az-harmony.

How to use

[edit]

From modules

[edit]

You can use _main() function, passing the word as an argument, and the function will return the vowel as a string:

local get_last_vowel = require("Module:az-last-vowel")._main
local last_vowel = get_last_vowel("söz") -- returns "ö"

From templates

[edit]

There is a main() function that wraps the core _main() for templates. You can invoke it with the word as an argument, and it'll return the vowel:

{{#invoke:az-last-vowel|main|nümunə}} <!-- returns "ə" -->