0.0.5-alpha.0 • Published 12 months ago

stopwords-utils v0.0.5-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

stopwords-utils

Utilities for working with stopwords in 50 languages.

Install

  • npm i stopwords-utils

Usage

isStopword

import { isStopword } from 'stopwords-utils';

console.log(isStopword('the')); // true

// second argument is optional and it takes a ISO 639-1 language code
console.log(isStopword('más', 'es')); // true

generateGetRandomStopwordFn

import { generateGetRandomStopwordFn } from 'stopwords-utils';

const getRandomStopwordEn = generateGetRandomStopwordFn();
console.log(getRandomStopwordEn());

const getRandomStopwordEs = generateGetRandomStopwordFn('es');
console.log(getRandomStopwordEs());