On 5/7/19 6:00 PM, [email protected] wrote: > 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! Ha, that's cool! It will be quite useful in possibly some machine learning projects as well!
