UNPKG

@bntk/transliteration

Version:

Build applications with Bengali natural language processing tools.

53 lines (52 loc) 2.04 kB
/** * Phonetic rules for Bangla transliteration */ export declare const phonetic: { /** * Normalizes the input string to handle case sensitivity correctly * according to the predefined rules. * * @param {string} input - The input string to fix * @returns {string} The fixed string with appropriate case handling */ fixString(input: string): string; /** * Checks if a character is a vowel according to phonetic rules. * * @param {string} c - The character to check * @returns {boolean} True if the character is a vowel, false otherwise */ isVowel(c: string): boolean; /** * Checks if a character is a consonant according to phonetic rules. * * @param {string} c - The character to check * @returns {boolean} True if the character is a consonant, false otherwise */ isConsonant(c: string): boolean; /** * Checks if a character is a punctuation (not a vowel or consonant). * * @param {string} c - The character to check * @returns {boolean} True if the character is punctuation, false otherwise */ isPunctuation(c: string): boolean; /** * Checks if a substring exactly matches a target string at a specific position. * * @param {string} needle - The substring to search for * @param {string} heystack - The string to search in * @param {number} start - The start position for the comparison * @param {number} end - The end position for the comparison * @param {boolean} not - Whether to negate the result * @returns {boolean} True if the substring is found at the specified position */ isExact(needle: string, heystack: string, start: number, end: number, not: boolean): boolean; /** * Checks if a character is case-sensitive according to phonetic rules. * * @param {string} c - The character to check * @returns {boolean} True if the character is case-sensitive, false otherwise */ isCaseSensitive(c: string): boolean; };