mò )á¸Ec@s,dZdkZdeifd„ƒYZdS(s×NBest Interface. An NBest object remembers the N best-scoring items ever passed to its .add(item, score) method. If .add() is called M times, the worst-case number of comparisons performed overall is M * log2(N). NtINBestcBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s Interface for an N-Best chooser.cCsdS(sRecord that item 'item' has score 'score'. No return value. The N best-scoring items are remembered, where N was passed to the constructor. 'item' can by anything. 'score' should be a number, and larger numbers are considered better. N((titemtscore((t:/data/zmath/zope/lib/python/Products/ZCTextIndex/INBest.pytaddscCsdS(s…Like "for item, score in sequence: self.add(item, score)". This is simply faster than calling add() len(seq) times. N((tsequence((Rtaddmany$scCsdS(sReturn the (at most) N best-scoring items as a sequence. The return value is a sequence of 2-tuples, (item, score), with the largest score first. If .add() has been called fewer than N times, this sequence will contain fewer than N pairs. N((((Rtgetbest*scCsdS(sŸReturn and remove the (item, score) pair with lowest score. If len(self) is 0, raise IndexError. To be cleaer, this is the lowest score among the N best-scoring seen so far. This is most useful if the capacity of the NBest object is never exceeded, in which case pop_smallest() allows using the object as an ordinary smallest-in-first-out priority queue. N((((Rt pop_smallest2s cCsdS(s¶Return the number of (item, score) pairs currently known. This is N (the value passed to the constructor), unless .add() has been called fewer than N times. N((((Rt__len__>scCsdS(stReturn the maximum number of (item, score) pairs. This is N (the value passed to the constructor). N((((RtcapacityEs( t__name__t __module__t__doc__RRRRR R (((RRs     (R t InterfacetBaseR(RR((Rt?s