rap2hpoutre / remove-stop-words
Remove stop words from a string
Installs: 25 804
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 2
Forks: 11
Open Issues: 3
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^6.5 || ^7.0.2
This package is auto-updated.
Last update: 2024-10-16 22:23:37 UTC
README
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 rap2hpoutre/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