Module:Chak-utilities/documentation: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Utilities for Chakobsa scripts.") |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Utilities for [[Chakobsa]] scripts. | Utilities for [[Chakobsa]] scripts. Implements {{temp|chak-from-root}}. | ||
====Exposed functions==== | |||
;{{code|lua|l(term, face, alt)}} | |||
:Creates a link to a Chakobsa lexeme - similar to {{temp|l|chak|term}} | |||
;{{code|lua|is_geminate(char)}} | |||
: returns true if the supplied 'character' is geminate | |||
;{{code|lua|compress_consonants(str)}} | |||
:Returns a 'compressed' version of the string where consonant digraphs are reduced to a single character and trigraph geminates are reduced to a geminate of a single character. Mostly for use with other functions for parsing. | |||
;{{code|lua|expand_consonants(str)}} | |||
:Returns an 'expanded' version of the string where reductions from <code>compress_consonants</code> are replaced with the original romanizations. | |||
;{{code|lua|parse_consonants(str)}} | |||
: Returns a string where the consonants have been split out, delimited by hyphens. Understands geminate consonants and considers them a 'single' consonant. | |||
;{{code|lua|parse_root(root_str,expandFinal)}} | |||
: Returns a table of parts of the root string is grouped by consonant and vowels. Example: "kkaalatg" > "kk","aa","l","a","tg". If expandFinal is true, returns the final part parsed out through <code>parse_consonants</code> The above example would be "kkaalatg" > "kk","aa","l","a","t-g". Used for inflection functions. |
Latest revision as of 16:05, 24 October 2023
Utilities for Chakobsa scripts. Implements {{chak-from-root}}
.
Exposed functions
l(term, face, alt)
- Creates a link to a Chakobsa lexeme - similar to
{{l|chak|term}}
is_geminate(char)
- returns true if the supplied 'character' is geminate
compress_consonants(str)
- Returns a 'compressed' version of the string where consonant digraphs are reduced to a single character and trigraph geminates are reduced to a geminate of a single character. Mostly for use with other functions for parsing.
expand_consonants(str)
- Returns an 'expanded' version of the string where reductions from
compress_consonants
are replaced with the original romanizations.
parse_consonants(str)
- Returns a string where the consonants have been split out, delimited by hyphens. Understands geminate consonants and considers them a 'single' consonant.
parse_root(root_str,expandFinal)
- Returns a table of parts of the root string is grouped by consonant and vowels. Example: "kkaalatg" > "kk","aa","l","a","tg". If expandFinal is true, returns the final part parsed out through
parse_consonants
The above example would be "kkaalatg" > "kk","aa","l","a","t-g". Used for inflection functions.