entervpl/remove-stop-words

This package is abandoned and no longer maintained. No replacement package was suggested.

Remove stop words from a string

v0.0.5 2023-02-06 12:58 UTC

This package is auto-updated.

Last update: 2024-03-24 16:13:44 UTC


README

Packagist Build Status Scrutinizer Code Quality

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

composer require entervpl/remove-stop-words

Usage

Just call the remove_stop_words function with a string.

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:

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