[Snowball-discuss] Python bindings for Snowball
Andreas Jung
andreas@andreas-jung.com
Sat, 15 Dec 2001 17:57:54 -0500
The API for Python is really simple:
import Stemmer
ST = Stemmer.Stemmer('german')
stemmed_word = ST.stem('blablaba....')
I will also add a function to stem a list of words in one run
(for performance reasons).
Using the old Makefile.pre.in mechanism of Python to compile
extension module, it has been necessary to rename <lang>/stem.c
to <lang>/<lang>stem.c because all .o were put in the same directory
so compiling one language has overwritten the .o files of the other
languages.
I would also like to see that the language dependant tarballs
have the language inside the filename of the tarball.
Andreas
----- Original Message -----
From: "Richard Boulton" <richard@tartarus.org>
To: "Andreas Jung" <andreas@andreas-jung.com>
Cc: <snowball-discuss@lists.sourceforge.net>
Sent: Saturday, December 15, 2001 17:35
Subject: Re: [Snowball-discuss] Python bindings for Snowball
> On Sat, 2001-12-15 at 20:40, Andreas Jung wrote:
> > Hi everyone,
> >
> > I found Snowball so cool that I have written Python bindings for
Snowball
> > - with support for all nine Snowball stemmers !
> I count twelve stemmers now...
>
> > I will release the bindings soon on Sourceforge. If anyone is interested
> > in a pre-release, let me know.
>
> Excellent! I've just done a bit of work on making a simple and
> consistent interface for C: consisting of three functions:
>
> struct sb_stemmer *
> sb_stemmer_create(const char * language);
>
> void
> sb_stemmer_release(struct sb_stemmer * stemmer);
>
> const char *
> sb_stemmer_stem(struct sb_stemmer * stemmer,
> const char * word, int size);
>
>
> (This code is in the libstemmer directory in the CVS - the Makefile
> needs tweaking so that it compiles the code as a library, but other than
> that the work is done.)
>
> I'd like to collaborate, to ensure that the bindings for all languages
> are as consistent as possible. Definitely interested in a pre-release.
>
> I'd also like to try and keep all snowball related material easy to find
> - so ideally I'd like to see the bindings being added to the website.
> I'd be very happy to help set this up.
>
> --
> Richard
>
> _______________________________________________
> Snowball-discuss mailing list
> Snowball-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/snowball-discuss
>
_______________________________________________
Snowball-discuss mailing list
Snowball-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snowball-discuss