[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - TextIndexNG.py:1.2.2.36
Andreas Jung
andreas@digicool.com
Sat, 16 Feb 2002 19:46:30 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv5829
Modified Files:
Tag: ajung-textindexng-branch
TextIndexNG.py
Log Message:
renamed "Proximity" to "Similarity"
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/TextIndexNG.py 1.2.2.35 => 1.2.2.36 ===
from queryparser.queryparser import QueryParser
-import Stemmer, Proximity as Similarity
+import Stemmer, Similarity
import Thesaurus, StopWords, Normalizer
import indexsupport
import TextIndexCommon
@@ -92,7 +92,7 @@
manage_options= (
{'label': 'Settings',
- 'action': 'manage_main',
+ 'action': 'manage_workspace',
'help': ('TextIndex','TextIndex_Settings.stx')},
{'label': 'Stop words',
'action': 'manage_stopwords',
@@ -152,7 +152,7 @@
self.splitterCasefolding = getattr(extra,'splitterCasefolding',1) or 1
# name of stemmer or None
- self.useStemmer = getattr(extra,'useStemmer', None) or None
+ self.useStemmer = getattr(extra,'useStemmer', None)
# default operator to combine queries
self.useOperator = getattr(extra,'useOperator', 'and')
@@ -161,7 +161,7 @@
self.useGlobbing = getattr(extra,'useGlobbing', 1)
# lexicon to be used (name, reference or None(internal))
- self.lexicon = getattr(extra,'lexicon', None) or None
+ self.lexicon = getattr(extra,'lexicon', None)
# use Similarity algorithm
self.useSimilarity = getattr(extra,'useSimilarity', None) or None
@@ -745,7 +745,8 @@
num = 0
for word,posLst in posMap:
- keys = posLst.keys( pos-bidirectional*nearDistance, pos+nearDistance)
+ keys = posLst.keys( pos-bidirectional*nearDistance,
+ pos+nearDistance)
if len(keys)>0: num+=1
@@ -827,7 +828,8 @@
self._stopwords._p_changed = 1
if RESPONSE:
- RESPONSE.redirect(URL1 + '/manage_stopwords?manage_tabs_message=Word%20added')
+ RESPONSE.redirect(URL1 +
+ '/manage_stopwords?manage_tabs_message=Word%20added')
def manage_delStopWord(self, words, RESPONSE=None, URL1=None):
@@ -837,7 +839,8 @@
self._stopwords._p_changed = 1
if RESPONSE:
- RESPONSE.redirect(URL1 + '/manage_stopwords?manage_tabs_message=Word%20deleted')
+ RESPONSE.redirect(URL1 +
+ '/manage_stopwords?manage_tabs_message=Word%20deleted')
@@ -872,7 +875,8 @@
return
if RESPONSE:
- RESPONSE.redirect(URL2 + '/manage_main?manage_tabs_message=Preferences%20saved')
+ RESPONSE.redirect(URL2 +
+ '/manage_main?manage_tabs_message=Preferences%20saved')
manage_workspace = DTMLFile("dtml/manageTextIndexNG",globals())