[Xapian-discuss] python how do i stem words in python?

mark markkicks at gmail.com
Sat Aug 16 03:20:43 BST 2008


On Fri, Aug 15, 2008 at 6:27 PM, Olly Betts <olly at survex.com> wrote:
> 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")
thanks a lot!! it works great!!!


>> 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
> http://xapian.org/docs/bindings/python/
thanks the simpleindexer is great to get started..

after i create an index once, can i update the document? how can i do
this in python?
also how do I delete a document from the database?
thanks a lot!



More information about the Xapian-discuss mailing list