[Zope-Checkins] CVS: Zope2 - GlobbingLexicon.py:1.1.2.6 Lexicon.py:1.1.2.9 Vocabulary.py:1.1.2.4
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Tue, 29 May 2001 19:45:39 -0400
Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/TextIndex
In directory serenade:/tmp/cvs-serv18989
Modified Files:
Tag: ajung-dropin-registry
GlobbingLexicon.py Lexicon.py Vocabulary.py
Log Message:
--- Updated File GlobbingLexicon.py in package Zope2 --
--- GlobbingLexicon.py 2001/05/29 19:12:33 1.1.2.5
+++ GlobbingLexicon.py 2001/05/29 23:45:39 1.1.2.6
@@ -123,9 +123,10 @@
eow = '$'
- def __init__(self,useSplitter=''):
+ def __init__(self,useSplitter=None):
self.clear()
- self.SplitterFunc = Splitter.getSplitter(useSplitter)
+ self.useSplitter = Splitter.splitterNames[0]
+ self.SplitterFunc = Splitter.getSplitter(self.useSplitter)
def clear(self):
self._lexicon = OIBTree()
--- Updated File Lexicon.py in package Zope2 --
--- Lexicon.py 2001/05/29 19:12:33 1.1.2.8
+++ Lexicon.py 2001/05/29 23:45:39 1.1.2.9
@@ -120,11 +120,11 @@
self.stop_syn = {}
else:
self.stop_syn = stop_syn
+
+ self.useSplitter = Splitter.splitterNames[0]
+ if useSplitter: self.useSplitter=useSplitter
- if useSplitter:
- self.SplitterFunc = Splitter.getSplitter(useSplitter)
- else:
- self.SplitterFunc = Splitter.getSplitter()
+ self.SplitterFunc = Splitter.getSplitter(self.useSplitter)
def clear(self):
--- Updated File Vocabulary.py in package Zope2 --
--- Vocabulary.py 2001/05/29 23:21:40 1.1.2.3
+++ Vocabulary.py 2001/05/29 23:45:39 1.1.2.4
@@ -91,6 +91,7 @@
from OFS.SimpleItem import Item
from Products.PluginIndexes.TextIndex import Lexicon, GlobbingLexicon
from Products.PluginIndexes.TextIndex.Lexicon import stop_word_dict
+from Products.PluginIndexes.TextIndex import Splitter
manage_addVocabularyForm=DTMLFile('dtml/addVocabulary',globals())
@@ -146,12 +147,15 @@
manage_main = DTMLFile('dtml/manage_vocab', globals())
manage_query = DTMLFile('dtml/vocab_query', globals())
- def __init__(self, id, title='', globbing=None,splitter=''):
+ def __init__(self, id, title='', globbing=None,splitter=None):
""" create the lexicon to manage... """
self.id = id
self.title = title
self.globbing = not not globbing
- self.useSplitter = splitter
+
+ self.useSplitter = Splitter.splitterNames[0]
+ if splitter:
+ self.useSplitter = splitter
if globbing:
self.lexicon = GlobbingLexicon.GlobbingLexicon(useSplitter=self.useSplitter)