Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.44 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.44 KB

php-stemmer

ci Codecov Coveralls

This stem extension for PHP provides stemming capability for a variety of languages using Dr. M.F. Porter's Snowball API. It has a much simpler API than the stem extension found in pecl.

This is a cleanup of php-stemmer. Tests have been added and the bundled libstemmer has been removed. Functions have been prefixed with the extension name. If you need features not provided by your system's default version of libstemmer, you can recompile libstemmer for your particular system.

Installation

Ubuntu

sudo apt-get install libstemmer-dev
git clone https://github.com/jbboehr/php-stemmer.git
cd php-stemmer
phpize
./configure
make
# make test
sudo make install

Usage

echo stemmer_stem_word('cats', 'english', 'UTF_8');  # cat
echo stemmer_stem_word('stemming', 'english', 'UTF_8');  # stem
var_dump(stemmer_languages()); # array(...)

License

This project is licensed under the New BSD License.