stopwords
A collection of stopwords for many languages
Supported languages
Language | Code |
---|---|
Arabic | ar |
Chinese | zh |
English | en |
French | fr |
German | de |
Italian | it |
Russian | ru |
Spanish | es |
Yoruba | yo |
Installation
$ npm i n-stopwords
Usage
// Node//Initialize with all languagesconst stopwords=; //Or set stopwords languagesconst stopwords='fr''en''es''yo'; //Check if your word is an stopwordstopwords; //Return french stopwordsstopwords; //Return all stopwordsstopwords; //Remove stopwords from text//for this example 'Et' and 'voilà' are stopwordslet result=stopwords;//expected result='puis'
Append your custom words
You can append new words as stopwords
stopwords;//orstopwords
words can be array of new files, array of stopwords or an stopword
Exclude custom words
You can also exclude words in stopwords if you don't need that one or many words appear as stopwords
stopwords;
words can be array of files, array of stopwords or an stopword