Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rap2hpoutre/remove-stop-words
Remove stop words from a string
https://github.com/rap2hpoutre/remove-stop-words
composer library package packagist php php-library php7
Last synced: 3 months ago
JSON representation
Remove stop words from a string
- Host: GitHub
- URL: https://github.com/rap2hpoutre/remove-stop-words
- Owner: rap2hpoutre
- License: mit
- Created: 2018-03-09T14:03:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T23:04:28.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T10:46:26.713Z (3 months ago)
- Topics: composer, library, package, packagist, php, php-library, php7
- Language: PHP
- Size: 563 KB
- Stars: 15
- Watchers: 2
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Remove stop words
[![Packagist](https://img.shields.io/packagist/l/rap2hpoutre/remove-stop-words.svg)](https://packagist.org/packages/rap2hpoutre/remove-stop-words)
[![Build Status](https://travis-ci.org/rap2hpoutre/remove-stop-words.svg?branch=master)](https://travis-ci.org/rap2hpoutre/remove-stop-words)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rap2hpoutre/remove-stop-words/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rap2hpoutre/remove-stop-words/?branch=master)Remove stop words from a string. It currently works in French, Spanish and English. Feel free to submit a Pull Request if you want to include your language.
## Installation
```bash
composer require rap2hpoutre/remove-stop-words
```## Usage
Just call the `remove_stop_words` function with a string.
```php
use function Rap2hpoutre\RemoveStopWords\remove_stop_words;echo remove_stop_words('The quick brown fox jumps over the lazy dog');
// quick brown fox jumps lazy dog
```
You can provide a locale as a second argument:```php
use function Rap2hpoutre\RemoveStopWords\remove_stop_words;echo remove_stop_words('Portez ce vieux whisky au juge blond qui fume', 'fr');
// Portez vieux whisky juge blond fume
```