1.1.2 • Published 4 years ago

n-stopwords v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

stopwords

A collection of stopwords for many languages

LanguageCode
Arabicar
Chinesezh
Englishen
Frenchfr
Germande
Italianit
Russianru
Spanishes
Yorubayo

Installation

$ npm i n-stopwords

Usage

// Node
//Initialize with all languages
const stopwords=require('n-stopwords')(); 

//Or set stopwords languages
const stopwords=require('n-stopwords')(['fr','en','es','yo']);

//Check if your word is an stopword
stopwords.isStopWord(your-word);

//Return french stopwords
stopwords.getStopWords(['fr']);

//Return all stopwords
stopwords.getStopWords();

//Remove stopwords from text
//for this example 'Et' and 'voilà' are stopwords
let result=stopwords.cleanText('Et puis voilà');
//expected 
result='puis'

Append your custom words

You can append new words as stopwords

stopwords.add(word);
//or
stopwords.add([{file:pathOfFile,encoding:encoding,separator:'\n'}];
//or
stopwords.add(['et','puis','voilà']);

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.remove(words);

words can be array of files, array of stopwords or an stopword

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago