PHPackages                             masroore/stopwords - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. masroore/stopwords

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

masroore/stopwords
==================

A PHP package to remove common stopwords from an input text, it covers most languages.

1.0.2(3y ago)15.7k↓40.6%12MITPHPPHP ^8.0 || ^8.1

Since Jun 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/masroore/php-stopwords)[ Packagist](https://packagist.org/packages/masroore/stopwords)[ Docs](https://github.com/masroore/php-stopwords)[ RSS](/packages/masroore-stopwords/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (4)Used By (2)

Stopwords for PHP
=================

[](#stopwords-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b760f33608c7eaff25d9a313f4cc8ca3ae23d798f4a87e6575675f5f0e79ffde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6173726f6f72652f73746f70776f7264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masroore/stopwords)[![GitHub Tests Action Status](https://camo.githubusercontent.com/95eba5c92165bf41f6e61d543314c4adf0c0b13c75b0a2cc16a9e06586e5cf13/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d6173726f6f72652f7068702d73746f70776f7264732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/masroore/php-stopwords/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f8735f09db9c4789be35a4832b23a6dc418afcd41202ca4f03a7bf5ef5aed778/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d6173726f6f72652f7068702d73746f70776f7264732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/masroore/php-stopwords/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d141760341f91746a67733af36eeaa3c3e5027dfe9395a6a295cf8d39e685f1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6173726f6f72652f73746f70776f7264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masroore/stopwords)

Overview
--------

[](#overview)

Stopwords in multiple languages that you can easily use with your PHP applications.

Supported languages
-------------------

[](#supported-languages)

Currently provides stopwords for the following languages:

- Arabic
- Azerbaijani
- Bengali
- Danish
- Dutch
- English
- Finnish
- French
- German
- Greek
- Hungarian
- Indonesian
- Italian
- Kazakh
- Nepali
- Norwegian
- Portuguese
- Romanian
- Russian
- Slovene
- Spanish
- Swedish
- Tajik
- Turkish

Installation
------------

[](#installation)

> **Requires [PHP 8.0+](https://php.net/releases/)**

You can install the package via composer:

```
composer require masroore/stopwords
```

Usage
-----

[](#usage)

```
$stopwords = new Kaiju\Stopwords\Stopwords();

// get the list of available languages
print_r($stopwords->getLanguages());

// load stopwords for a language
$stopwords->load('english');

// load stopwords for multiple languages
$stopwords->load(['english', 'french']);

// load stopwords for all available languages
$stopwords->load('*');

// check if the given word is a stop-word
$stopwords->isStopword('the'); // TRUE
$stopwords->isStopword('America'); // FALSE

// return a tokenized copy of the text, with stop-words and punctuation marks removed
$text = "Good muffins cost $3.88\nin New York.  Please buy me two of them.\n\nThanks!\n";
print_r($stopwords->strip($text));
// ["Good","muffins","cost","$3.88","New","York","Please","buy","two","Thanks"]

echo $stopwords->clean($text);
// "Good muffins cost $3.88 New York Please buy two Thanks"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Thank you for considering to contribute to Collision. All the contribution guidelines are mentioned [here](CONTRIBUTING.md).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Masroor Ehsan](https://github.com/masroore)
- [All Contributors](../../contributors)

License
-------

[](#license)

Collision is an open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1437d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/200963?v=4)[Masroor Ehsan](/maintainers/masroore)[@masroore](https://github.com/masroore)

---

Top Contributors

[![masroore](https://avatars.githubusercontent.com/u/200963?v=4)](https://github.com/masroore "masroore (22 commits)")

---

Tags

phpstringwordtextnlpnatural language processingstop wordsanalyzerstopwordstokenizestopwordstop-wordstopword liststop list

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/masroore-stopwords/health.svg)

```
[![Health](https://phpackages.com/badges/masroore-stopwords/health.svg)](https://phpackages.com/packages/masroore-stopwords)
```

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[codewithkyrian/transformers

State-of-the-art Machine Learning for PHP. Run Transformers in PHP

749231.8k5](/packages/codewithkyrian-transformers)[coduo/php-to-string

Simple library that converts PHP value into strings

27112.7M10](/packages/coduo-php-to-string)[edgaras/strsim

Collection of string similarity and distance algorithms in PHP including Levenshtein, Damerau-Levenshtein, Jaro-Winkler, and more

2423.0k](/packages/edgaras-strsim)[juanantoniodelgado/stopwords

A stopwords removal library

1167.7k1](/packages/juanantoniodelgado-stopwords)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
