[Zope-Checkins] CVS: Zope/lib/python/Products/ZCTextIndex - HTMLSplitter.py:1.10.10.1 Lexicon.py:1.17.10.1
Casey Duncan
casey@zope.com
Mon, 2 Dec 2002 01:09:22 -0500
Update of /cvs-repository/Zope/lib/python/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv13689/lib/python/Products/ZCTextIndex
Modified Files:
Tag: Zope-2_6-branch
HTMLSplitter.py Lexicon.py
Log Message:
Collector #597: Add locale-awareness to ZCTextIndex splitters. Added unittest
=== Zope/lib/python/Products/ZCTextIndex/HTMLSplitter.py 1.10 => 1.10.10.1 ===
--- Zope/lib/python/Products/ZCTextIndex/HTMLSplitter.py:1.10 Thu May 23 11:05:34 2002
+++ Zope/lib/python/Products/ZCTextIndex/HTMLSplitter.py Mon Dec 2 01:08:51 2002
@@ -21,14 +21,15 @@
__implements__ = ISplitter
- def process(self, text, wordpat=r"\w+"):
+ def process(self, text, wordpat=r"(?L)\w+"):
splat = []
for t in text:
splat += self._split(t, wordpat)
return splat
def processGlob(self, text):
- return self.process(text, r"\w+[\w*?]*") # see Lexicon.globToWordIds()
+ # see Lexicon.globToWordIds()
+ return self.process(text, r"(?L)\w+[\w*?]*")
def _split(self, text, wordpat):
text = text.lower()
=== Zope/lib/python/Products/ZCTextIndex/Lexicon.py 1.17 => 1.17.10.1 ===
--- Zope/lib/python/Products/ZCTextIndex/Lexicon.py:1.17 Thu May 23 11:05:34 2002
+++ Zope/lib/python/Products/ZCTextIndex/Lexicon.py Mon Dec 2 01:08:51 2002
@@ -156,8 +156,8 @@
class Splitter:
import re
- rx = re.compile(r"\w+")
- rxGlob = re.compile(r"\w+[\w*?]*") # See globToWordIds() above
+ rx = re.compile(r"(?L)\w+")
+ rxGlob = re.compile(r"(?L)\w+[\w*?]*") # See globToWordIds() above
def process(self, lst):
result = []