php-stemmer
Andrea Maccis <[email protected]> Sun, 23 Feb 2020 11:40:07 +0100
| Newsgroups | gmane.comp.search.snowball |
|---|---|
| Message-ID | <CAPybYL1wdixMr2reAKLepV63BJenx+5=9esK1yqMqPAgsDx3QA@mail.gmail.com> |
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 _______________________________________________ Snowball-discuss mailing list [email protected] https://lists.tartarus.org/mailman/listinfo/snowball-discuss