Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stopwords-iso

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stopwords-iso

The most comprehensive collection of stopwords for multiple languages.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
129K
increased by13.26%
Maintainers
1
Weekly downloads
 
Created

What is stopwords-iso?

The stopwords-iso npm package provides a comprehensive collection of stopwords for multiple languages. Stopwords are common words that are usually filtered out in natural language processing tasks because they carry less meaningful information. This package is useful for text preprocessing in various languages.

What are stopwords-iso's main functionalities?

Retrieve stopwords for a specific language

This feature allows you to retrieve an array of stopwords for a specific language. In this example, we retrieve the stopwords for English.

const stopwords = require('stopwords-iso');
const englishStopwords = stopwords['en'];
console.log(englishStopwords);

Retrieve stopwords for multiple languages

This feature allows you to retrieve stopwords for multiple languages at once. In this example, we retrieve stopwords for English, French, and German.

const stopwords = require('stopwords-iso');
const languages = ['en', 'fr', 'de'];
const multiLangStopwords = languages.reduce((acc, lang) => {
  acc[lang] = stopwords[lang];
  return acc;
}, {});
console.log(multiLangStopwords);

Check if a word is a stopword

This feature allows you to check if a given word is a stopword in a specified language. In this example, we check if 'the' is an English stopword and if 'maison' is a French stopword.

const stopwords = require('stopwords-iso');
const isStopword = (word, lang) => stopwords[lang].includes(word);
console.log(isStopword('the', 'en')); // true
console.log(isStopword('maison', 'fr')); // false

Other packages similar to stopwords-iso

Keywords

FAQs

Package last updated on 05 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc