Eugene!
2010-Feb-02 07:22 UTC
[Xapian-discuss] How to use a custom stemmer from Python bindings?
Hi, I'm using Xapian bindings for Python in my project. How could I use a custom stemmer instead of the included one (Snowball)? The one I'm looking at right now is Hunspell (http://hunspell.sourceforge.net/) which has Python bindings (http://code.google.com/p/pyhunspell/). Thanks in advance, Eugene
Olly Betts
2010-Feb-02 10:47 UTC
[Xapian-discuss] How to use a custom stemmer from Python bindings?
On Tue, Feb 02, 2010 at 01:22:11PM +0600, Eugene! wrote:> I'm using Xapian bindings for Python in my project. How could I use a > custom stemmer instead of the included one (Snowball)?You can't use a custom stemmer in place of a Xapian::Stem object currently - there's an experimental patch which allows this in ticket #186, but that couldn't be easily wrapped by SWIG so it has been left for now: http://trac.xapian.org/ticket/186 You can just split the text into words yourself, stem them with your own algorithm, and then add them using Document.add_term() or Document.add_posting().> The one I'm > looking at right now is Hunspell (http://hunspell.sourceforge.net/) > which has Python bindings (http://code.google.com/p/pyhunspell/).How does it compare to Snowball? Cheers, Olly