stopwords-utils
Version:
Utilities for working with stopwords in 50 languages.
21 lines (17 loc) • 533 B
TypeScript
import {
stopwordsLanguageType,
languageType,
} from 'fullfiller-common/src/types';
declare function isStopword(
word: string,
language?: stopwordsLanguageType
): boolean;
/**
* @param language must use languageType instead of stopwordsLanguageType
* because `stopwords-frequency.json` was generated using `tokenize-words`
* which can't tokenize Japanese, Chinese and Thai
*/
declare const generateGetRandomStopwordFn: (
language?: languageType
) => () => string;
export { generateGetRandomStopwordFn, isStopword };