axisofstevil/stop-words

A library for managing and filtering text with stop words

0.1.0 2014-12-29 22:47 UTC

This package is auto-updated.

Last update: 2020-05-14 01:23:42 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

This library is intended to help filter your text with common stop words. It includes a list of built-in basic and strict stop words. It also includes functionality that lets you merge or overwrite with your own list of words.

Install

Via Composer

$ composer require axisofstevil/stop-words

Usage

$filter = new Axisofstevil\StopWords\Filter();
echo $filter->cleanText('A Walk to Remember'); // 'Walk Remember'

$filter->setWords(array('a','walk','to'));
echo $filter->cleanText('A Walk to Remember'); // 'Remember'

$filter->mergeWords(array('remember'));
echo $filter->cleanText('A Walk to Remember'); // ''

Testing

$ ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.