UNPKG

@bntk/stemming

Version:

Build applications with Bengali natural language processing tools.

32 lines (31 loc) 1.04 kB
/** * Removes matching prefix from the beginning of a word * @param word The word to remove prefix from * @returns The word with prefix removed if matched, otherwise original word */ export declare function removePrefix(word: string): string; /** * Removes matching suffix from the end of a word * @param word The word to remove suffix from * @returns The word with suffix removed if matched, otherwise original word */ export declare function removeSuffix(word: string): string; /** * Stems a Bangla word by removing prefixes and suffixes * @param word The word to stem * @returns The stemmed word */ export declare function stemWord(word: string): string; /** * Stems an array of Bangla words * @param words Array of words to stem * @returns Array of stemmed words */ export declare function stemWords(words: string[]): string[]; declare const _default: { stem: typeof stemWord; stemWords: typeof stemWords; removePrefix: typeof removePrefix; removeSuffix: typeof removeSuffix; }; export default _default;