unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: snowball stemmer
       [not found] <mailman.139.1557244824.10909.guile-user@gnu.org>
@ 2019-05-07 20:17 ` Zelphir Kaltstahl
  0 siblings, 0 replies; only message in thread
From: Zelphir Kaltstahl @ 2019-05-07 20:17 UTC (permalink / raw)
  To: guile-user


On 5/7/19 6:00 PM, guile-user-request@gnu.org 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!



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-07 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.139.1557244824.10909.guile-user@gnu.org>
2019-05-07 20:17 ` snowball stemmer Zelphir Kaltstahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).