@zsnout/ithkuil
Version:
A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.
36 lines (35 loc) • 1.15 kB
TypeScript
/** An object mapping from vowels to their stressed counterparts. */
export declare const VOWEL_TO_STRESSED_VOWEL_MAP: {
readonly a: "á";
readonly ä: "â";
readonly e: "é";
readonly ë: "ê";
readonly i: "í";
readonly o: "ó";
readonly ö: "ô";
readonly u: "ú";
readonly ü: "û";
};
/**
* Applies stress to a vowel form, marking it either with an accent (´) or a
* circumflex (ˆ).
*
* @param vowelForm The vowel form to apply stress to.
* @returns The stressed vowel form.
*/
export declare function stressVowelForm(vowelForm: string): string;
/**
* Counts the number of vowels and dipthongs in a string.
*
* @param text The text to count the vowels of.
* @returns The number of vowels and dipthongs in the given string.
*/
export declare function countVowelForms(text: string): number;
/**
* Marks a specific syllable of a word with stress.
*
* @param word The word to apply stress to.
* @param position The position to apply stress at.
* @returns The word, with the proper syllable stressed.
*/
export declare function applyStress(word: string, position: -4 | -3 | -2 | -1): string;