[Zope-Checkins] SVN: Zope/branches/tyam-unicodeSplitterPatch/lib/python/Products/ZCTextIndex/Lexicon.py added a hook for CJK process

Takeshi Yamamoto tyam at mac.com
Wed Sep 30 06:20:17 EDT 2009


Log message for revision 104648:
  added a hook for CJK process

Changed:
  U   Zope/branches/tyam-unicodeSplitterPatch/lib/python/Products/ZCTextIndex/Lexicon.py

-=-
Modified: Zope/branches/tyam-unicodeSplitterPatch/lib/python/Products/ZCTextIndex/Lexicon.py
===================================================================
--- Zope/branches/tyam-unicodeSplitterPatch/lib/python/Products/ZCTextIndex/Lexicon.py	2009-09-30 10:00:33 UTC (rev 104647)
+++ Zope/branches/tyam-unicodeSplitterPatch/lib/python/Products/ZCTextIndex/Lexicon.py	2009-09-30 10:20:17 UTC (rev 104648)
@@ -80,7 +80,8 @@
     def termToWordIds(self, text):
         last = _text2list(text)
         for element in self._pipeline:
-            last = element.process(last)
+            process = getattr(element, "process_post_glob", element.process)
+            last = process(last)
         wids = []
         for word in last:
             wids.append(self._wids.get(word, 0))



More information about the Zope-Checkins mailing list