https://github.com/jbboehr/php-stemmer
PHP extension providing stemming capability for a variety of languages
https://github.com/jbboehr/php-stemmer
libstemmer php php-bindings php-extension php-stemmer stem-extension
Last synced: 11 months ago
JSON representation
PHP extension providing stemming capability for a variety of languages
- Host: GitHub
- URL: https://github.com/jbboehr/php-stemmer
- Owner: jbboehr
- License: other
- Created: 2015-01-28T21:39:31.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T03:35:55.000Z (almost 2 years ago)
- Last Synced: 2025-03-31T05:33:10.095Z (12 months ago)
- Topics: libstemmer, php, php-bindings, php-extension, php-stemmer, stem-extension
- Language: Nix
- Homepage: https://code.google.com/p/php-stemmer/
- Size: 65.4 KB
- Stars: 11
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-stemmer
[](https://github.com/jbboehr/php-stemmer/actions/workflows/ci.yml)
[](https://codecov.io/gh/jbboehr/php-stemmer)
[](https://coveralls.io/github/jbboehr/php-stemmer?branch=master)
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](https://code.google.com/p/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
```bash
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
```php
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](http://opensource.org/licenses/BSD-3-Clause).