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

Xapian nobody at xapian.org
Mon Jun 21 19:44:11 BST 2010


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

Comment(by esizikov):

 It is impossible to use in-place instantiation of a custom stem
 implementation (e.g. stem = xapian.Stem(MyStemmer()) ...) with the current
 implementation. If the following patch would be applied to the Python
 bindings then it will fail with segmentation error:

 {{{
 Index: xapian-bindings/python/smoketest2.py
 ===================================================================
 --- xapian-bindings/python/smoketest2.py        (revision 14737)
 +++ xapian-bindings/python/smoketest2.py        (working copy)
 @@ -342,6 +342,9 @@
                   "5 * foo")

  def test_userstem():
 +    stem = xapian.Stem(MyStemmer())
 +    expect(stem('test'), 'tst')
 +
      mystem = MyStemmer()
      stem = xapian.Stem(mystem)
      expect(stem('test'), 'tst')
 }}}

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



More information about the Xapian-tickets mailing list