GitHunt
JB

jbboehr/php-stemmer

PHP extension providing stemming capability for a variety of languages

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.

Languages

Nix44.2%PHP26.4%C25.9%M43.5%Shell0.1%

Contributors

Other
Created January 28, 2015
Updated August 13, 2024