[Xapian-tickets] [Xapian] #448: Allow usage of custom stemmers

Xapian nobody at xapian.org
Mon Feb 15 08:30:51 GMT 2010


#448: Allow usage of custom stemmers
-------------------------+--------------------------------------------------
 Reporter:  esizikov     |        Owner:  olly    
     Type:  enhancement  |       Status:  reopened
 Priority:  normal       |    Milestone:          
Component:  Library API  |      Version:  1.0.17  
 Severity:  normal       |   Resolution:          
 Keywords:               |    Blockedby:          
 Platform:  All          |     Blocking:          
-------------------------+--------------------------------------------------

Comment(by esizikov):

 1. Seems like Xapian::Stem has to have a vtable for allow correct. Without
 any virtual method it just doesn't work.
  2. Seems like SWIG "director" feature is not really required, thus
 xapian-bindings-1.0.17-stem-director.patch could be dropped out. Thanks
 for pointing that (I've meantioned I'm not a SWIG expert).
  3. It's OK to put ABI changes into trunk only if I'll get it as a stable
 release in a near future
  4. Yeah, sure. We could even have some "standard" stemmers in C++ level
 and allow one to use all/any of them by configure-time options. The best
 would be proceeding this way with providing SWIG bindings for each stemmer
 implementation.
  5. std::string::data() is a pointer to already prepared buffer of BUFSIZ
 size (see the line # 158 in the attachment v 0.1.1, so I'm using
 std::string as a self-contained buffer which will be freed immediately
 after going out of scopes.
  6. I didn't manage to build without copying create_s() function into my
 code - I would say it's a design issue of Xapian::Stem : why doesn't it a
 protected member of the class but an extern function? If I'm subclassing
 Xapian::Stem from outside the Xapian core/bindings (e.g. this extension
 module) I do not have it's implementation but only declaration. If you
 tell me how to get it to work without copying the code I'd gladly do it
 that way.
  7. I agree with you regarding copyrights - just forgot to update headers
 before attaching it here.

-- 
Ticket URL: <http://trac.xapian.org/ticket/448#comment:5>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list