Module:grc-utilities/documentation

This module contains four functions, three of which are called by other modules.

takes spacing or nonstandard diacritics and converts them to standard combining diacritics. This function is used by.

takes the diacritics, removes them from the letter (lua), and reorders them so that macrons or breves are first; diaeresis or breathing mark is second; acute, grave, or circumflex is third; and iota subscript is last. Aside from the iota subscript part, this is the only order in which the diacritics can display correctly, as explained elsewhere. This function is used by Module:typing-aids and.



does the same thing, except it puts the macron or breve and iota subscript last and recombines the diacritics (lua) after reordering them. The diaeresis or breathing mark and accent mark will recombine, while the macron and breve remains uncombined as a combining character. This function is used by Module:grc-pronunciation and.

Module:grc-utilities/data holds the diacritic definitions and substitutions that are used by this module.

Tokenization
The function  breaks the text into meaningful units of a single consonant or monophthong letter, or diphthong, with any diacritics, as shown below. This function is used by Module:grc-translit and Module:grc-accent, and by the sandbox module Module:grc-pronunciation/sandbox.

The first argument is the word to be tokenized. The second is a boolean: if true, the function will group εω together as a diphthong, for instance in, genitive of.