Skip to content
This stem extension for PHP provides stemming capability for a variety of languages.
Find file
Latest commit cb5f0f3 May 7, 2014 @hthetiot Merge pull request #11 from gaetan-petit/patch-1
Failed to load latest commit information.
libstemmer_c fix libstemmer_c compilation issues #5 Jan 15, 2014


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.

Usage Example

    echo stemword('cats', 'english', 'UTF_8');      # cat
    echo stemword('stemming', 'english', 'UTF_8');  # stem


The stemmer PHP extension can be installed following the instructions about building PHP extensions using phpize as described in the PHP manual.

To build this extension, you need to have the PHP development tools installed. For ubuntu/debian you can use apt-get install php5-dev.

The phpize command is used to prepare the build environment for a PHP extension.

In the following sample, the sources for an extension are in a directory named stemmer-php:

 # git clone
 # cd php-stemmer
 # phpize
 # ./configure
 # make -C libstemmer_c
 # make
 # [sudo] make install

Edit you php.ini file and add the line

About libstemmer_c

The stemmer PHP extension uses a modified version of libstemmer_c.

It has replaced the default Dutch stemming algorithm with the much better Kraaij-Pohlmann Dutch stemming algorithm. The modified version of this lib can be downloaded from

Original Source

This version is a fork of php-stemmer hosted on Google Code orinaly made by Javeline B.V and available here:


New BSD License

See License file for details

Something went wrong with that request. Please try again.