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

Takeshi Yamamoto tyam at mac.com
Fri Oct 2 01:01:33 EDT 2009


Log message for revision 104724:
  added a hook for CJK processing.

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

-=-
Modified: Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/Lexicon.py
===================================================================
--- Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/Lexicon.py	2009-10-02 04:15:49 UTC (rev 104723)
+++ Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/Lexicon.py	2009-10-02 05:01:33 UTC (rev 104724)
@@ -76,7 +76,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 checkins mailing list