[Xapian-tickets] [Xapian] #448: Allow usage of custom stemmers
Xapian
nobody at xapian.org
Sun Feb 14 12:29:59 GMT 2010
#448: Allow usage of custom stemmers
-------------------------+--------------------------------------------------
Reporter: esizikov | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
-------------------------+--------------------------------------------------
Comment(by esizikov):
Personally I need in this feature to be available from Python bindings.
For that to work I used a very small patch of both Xapian and Xapian
bindings v. 1.0.17 (see attached patches).
What it does is simple declares the destructor of Xapian::Stem (the first
patch) to be virtual which enables usage of SWIG ''directors' for the Stem
class (the second patch).
With patched Xapian and Xapian bindings it becomes possible to subclass
the Xapian::Stem and Xapian::Stem::Internal with the latter to use another
stemmer (personally I'm using Hunspell for that).
Current shortcommings:
1. in Python the subclassed HunspellStem.__call__() function doesn't
accept Unicode objects. At the same time the original
xapian.Stem.__call__() does support Unicode object, thus I missed
something. Could you give me a hint how to fix that?
--
Ticket URL: <http://trac.xapian.org/ticket/448#comment:1>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list