[Zope-CVS] CVS: Products/ZCTextIndex - Lexicon.py:1.1.2.6

Jeremy Hylton jeremy@zope.com
Fri, 3 May 2002 16:59:30 -0400


Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv26269

Modified Files:
      Tag: TextIndexDS9-branch
	Lexicon.py 
Log Message:
Add some methods to the lexicon to get the words, words, and words &
wids out.


=== Products/ZCTextIndex/Lexicon.py 1.1.2.5 => 1.1.2.6 ===
 
     def length(self):
-        # Return the number of unique terms in the lexicon
+        """Return the number of unique terms in the lexicon."""
         return self.__nextwid - 1
+
+    def words(self):
+        return self.__wids.keys()
+
+    def wids(self):
+        return self.__words.keys()
+
+    def items(self):
+        return self.__wids.items()
 
     def sourceToWordIds(self, text):
         last = _text2list(text)