Ranking
index
Ranking.py

Create, access, and manipulate document score lists.

 
Classes
       
builtins.object
Ranking

 
class Ranking(builtins.object)
    Ranking(n)
 
Ranking object stores a search ranking and returns the top n.
 
  Methods defined here:
__init__(self, n)
Create an empty list that can store a ranking.
__len__(self)
add(self, iid, score)
Add a document to the ranking (unsorted).
iid: An internal document id.
score: The document score.
get_ranking(self)
Get a ranked list in (score, externalId) order.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
Entry = <class 'Ranking.Ranking.Entry'>
A utility class to create an <externalDocid, score> object
for the _ranking list.