mò )á¸Ec@sYdZdklZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS( sSZCTextIndex z3 interfaces. $Id: interfaces.py 39791 2005-10-31 20:49:32Z yuppie $ (s Interfacet IZCTextIndexcBstZdZRS(sPersistent text index. (t__name__t __module__t__doc__(((t>/data/zmath/zope/lib/python/Products/ZCTextIndex/interfaces.pyRs tILexiconcBsVtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( s@Object responsible for converting text to word identifiers. cCsdS(sòReturn a sequence of ids of the words parsed from the text. The input text may be either a string or a list of strings. Parse the text as if they are search terms, and skips words that aren't in the lexicon. N((ttext((Rt termToWordIds scCsdS(sReturn a sequence of ids of the words parsed from the text. The input text may be either a string or a list of strings. Parse the text as if they come from a source document, and creates new word ids for words that aren't (yet) in the lexicon. N((R((RtsourceToWordIds)scCsdS(sReturn a sequence of ids of words matching the pattern. The argument should be a single word using globbing syntax, e.g. 'foo*' meaning anything starting with 'foo'. Return the wids for all words in the lexicon that match the pattern. N((tpattern((Rt globToWordIds3scCsdS(s9Return the number of unique term in the lexicon. N((((Rtlength=scCsdS(smReturn the word for the given word id. Raise KeyError if the word id is not in the lexicon. N((twid((Rtget_wordAscCsdS(sdReturn the wird id for the given word. Return 0 of the word is not in the lexicon. N((tword((Rtget_widGscCsdS(s Pass the text through the pipeline. Return a list of words, normalized by the pipeline (e.g. stopwords removed, case normalized etc.). N((R((Rt parseTermsMscCsdS(s}Return true if the word is a globbing pattern. The word should be one of the words returned by parseTerm(). N((R((RtisGlobTs( RRRRRR R R RRR(((RRs     t IZCLexiconcBstZdZRS(sLexicon for ZCTextIndex. (RRR(((RR[s N(Rtzope.interfacet InterfaceRRR(RRRR((Rt?s @