Skip to content

phphead/php-stemmer

 
 

Repository files navigation

php-stemmer

GitHub Linux Build Status GitHub Docker Build Status

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.

About

PHP extension providing stemming capability for a variety of languages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 29.8%
  • PHP 21.1%
  • Nix 18.7%
  • C 18.3%
  • Dockerfile 9.3%
  • M4 2.8%