[Snowball-discuss] php-stemmer

Andrea Maccis andrea.maccis at gmail.com
Sun Feb 23 10:40:07 GMT 2020


Hi all!

As you probably know, PHP had a few interfaces to Snowball compiled
stemming algorithms:
- stem (https://pecl.php.net/package/stem);
- php-stemmer (https://code.google.com/archive/p/php-stemmer/);
- others...;
but these interfaces were written for PHP 4/5 using Zend extensions API.
Eventually PHP (since 7.4) introduced FFI (like Python or LUA) so now we
can loading shared libraries, calling C functions and accessing C data
structures in pure PHP, without the burden of the Zend extension API.
So, I wrote a new interface largely inspired by Richard Boulton's PyStemmer
and it is available via packagist:
https://packagist.org/packages/amaccis/php-stemmer.
Besides I wrote a Dockerfile in order to create a Docker image with the env
set-up needed by my library (I mean, PHP 7.4, FFI extension, libstemmer
compiled like a shared library) and this image is available via DockerHub:
https://hub.docker.com/r/amaccis/php-libstemmer.
I would appreciate any suggestions and comments, these are my repos:
- https://github.com/amaccis/php-stemmer
- https://github.com/amaccis/docker-php-libstemmer
I hope it can be useful.

Kind Regards,
Andrea Maccis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tartarus.org/pipermail/snowball-discuss/attachments/20200223/23b2ba11/attachment.htm>


More information about the Snowball-discuss mailing list