hi, i am newbie to xapian and am trying to get started with it in python. there is no stemmer.stem_word method in the latest python library. how do i stem words before doing doc.add_posting? is there any sample hello world code in python that i can use? thanks a lot!>>> stemmer = xapian.Stem('english') >>> stemmer.stemmer.__call__ stemmer.__reduce_ex__ stemmer.__class__ stemmer.__repr__ stemmer.__delattr__ stemmer.__setattr__ stemmer.__dict__ stemmer.__str__ stemmer.__doc__ stemmer.__swig_destroy__ stemmer.__getattribute__ stemmer.__weakref__ stemmer.__hash__ stemmer.get_available_languages stemmer.__init__ stemmer.get_description stemmer.__module__ stemmer.this stemmer.__new__ stemmer.thisown stemmer.__reduce__
On Fri, Aug 15, 2008 at 05:52:40PM -0700, mark wrote:> there is no stemmer.stem_word method in the latest python library. how > do i stem words before doing doc.add_posting?It's operator() in C++ which is wrapped as a __call__ method in Python. So use it like this: stemmer = xapian.Stem("english") stem = stemmer("sausages")> is there any sample hello world code in python that i can use?There are some examples in the documentation, which you should have got when you installed the bindings. If not, complain to whoever built the packages you're using. You can browse them online too, linked from here: http://xapian.org/docs/bindings/python/ Cheers, Olly