UNPKG

cmu-syllable-counter

Version:

Fast and accurate syllable counter for English words using CMU Dictionary

17 lines 866 B
import type { HyphenationOptions } from "./syllable-counter"; /** * Hyphenate a word or sentence using the Knuth–Liang algorithm. * @param word The word or sentence to hyphenate. * @param options Hyphenation options, including custom patterns and delimiter. * @returns The hyphenated word or sentence. */ export declare function enhancedHyphenateWord(word: string, options?: HyphenationOptions): string; /** * Get the syllable boundaries (indexes where hyphens would be placed). * This function returns the positions within the word where a hyphen can be inserted. * @param word The word or sentence. * @param options Hyphenation options. * @returns An array of indices where hyphens can be placed. */ export declare function getSyllableBoundaries(word: string, options?: HyphenationOptions): number[]; //# sourceMappingURL=fallback-hyphenation.d.ts.map