GitXplorerGitXplorer
h

php-stemmer

public
37 stars
9 forks
3 issues

Commits

List of commits on branch master.
Verified
e2d2cf398e783138267c07ffcd9e7aa131d0e443

Merge pull request #19 from Werkspot/php-8

hhthetiot committed 4 years ago
Unverified
9717bd4ceaff26f1a2154a781e2d9336b53d9f2c

Fix for Missing arginfo for stemword()

fferrastas committed 4 years ago
Unverified
7088d10845884588912b6662a5dc8da088ca9b88

Add compatibility for php8

fferrastas committed 4 years ago
Unverified
127c4dac8817a643de693a0276827661633583b1

Merge pull request #16 from arielallon/master

hhthetiot committed 8 years ago
Unverified
6af7c19b635e6d55207337b9eac6ebb5c15b4b8f

restoring compatibility with PHP <7

aarielallon committed 8 years ago
Unverified
160e2d6cbb2563ef4f07980f862c33e5b4c041c7

Merge pull request #13 from crocodile2u/php7-support

hhthetiot committed 8 years ago

README

The README file for this repository.

php-stemmer

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

<?php
    echo stemword('cats', 'english', 'UTF_8');      # cat
    echo stemword('stemming', 'english', 'UTF_8');  # stem
?>

Install

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 https://github.com/hthetiot/php-stemmer.git
 # cd php-stemmer
 # phpize
 # ./configure
 # make -C libstemmer_c
 # make
 # [sudo] make install

Edit you php.ini file and add the line extension=stemmer.so

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 mysqludf.com.

Original Source

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

Licence

New BSD License

See License file for details