d11dba79 — Amirouche 6 months ago
cosmit
890b2c45 — Amirouche 6 months ago
acutally guard stemmer
87c2cc37 — Amirouche 6 months ago
Add README.md

refs

master
browse log
v0.1.1
browse .tar.gz

clone

read-only
https://git.sr.ht/~amz3/guile-snowball-stemmer
read/write
git@git.sr.ht:~amz3/guile-snowball-stemmer

You can also use your local clone with git send-email.

guile-snowball-stemmer

I am pleased to announce the immediate availability of guile-snowball-stemmer.

This is binding library that allows to compute the stem of words in various languages. The list of supported language is available in the following REPL run.

This is a binding library. The official website is at https://snowballstem.org/

It is mostly useful in the context of information retrieval.

The code is at https://git.sr.ht/~amz3/guile-snowball-stemmer

The libstemmer shared library path is hardcoded as guix path of the library. A guix package definition of the C library is available in my guix channel at:

https://git.sr.ht/~amz3/guix-amz3-channel

That said there is no guix package for the bindings. Just include the file attached to this mail in you project.

Here is a demo:

scheme@(guile-user)> (import (snowball-stemmer)) stemmer/snowball-stemmer.scm.go

scheme@(guile-user)> (stemmers) $1 = (turkish swedish spanish russian romanian portuguese porter norwegian italian hungarian german french finnish english dutch danish)

scheme@(guile-user)> (make-stemmer amazigh) ERROR: In procedure scm-error: ERROR: snowball-stemmer Oops! Stemmer not found amazigh

scheme@(guile-user)> (define english (make-stemmer english)) scheme@(guile-user)> (stem english cycling) $2 = cycl scheme@(guile-user)> (stem english ecology) $3 = ecolog scheme@(guile-user)> (stem english library) $4 = librari scheme@(guile-user)> (stem english virtual) $5 = virtual scheme@(guile-user)> (stem english environment) $6 = environ

scheme@(guile-user)> (define french (make-stemmer french)) scheme@(guile-user)> (stem french environnement) $7 = environ scheme@(guile-user)> (stem french bibliotheque) $8 = bibliothequ scheme@(guile-user)> (stem french gazette) $9 = gazet scheme@(guile-user)> (stem french constituant) $10 = constitu

Happy hacking!