Commit 8915733b authored by Jeremy Hylton's avatar Jeremy Hylton

Shorten comment so it fits on line.

parent 504af04c
...@@ -75,7 +75,7 @@ class CosineIndex(BaseIndex): ...@@ -75,7 +75,7 @@ class CosineIndex(BaseIndex):
for wid in wids: for wid in wids:
assert self._wordinfo.has_key(wid) # caller responsible for OOV assert self._wordinfo.has_key(wid) # caller responsible for OOV
d2w = self._wordinfo[wid] # maps docid to w(docid, wid) d2w = self._wordinfo[wid] # maps docid to w(docid, wid)
idf = inverse_doc_frequency(len(d2w), N) # this is an unscaled float idf = inverse_doc_frequency(len(d2w), N) # an unscaled float
#print "idf = %.3f" % idf #print "idf = %.3f" % idf
if isinstance(d2w, DictType): if isinstance(d2w, DictType):
d2w = IIBucket(d2w) d2w = IIBucket(d2w)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment