search functionality to obtain set of documents

This commit is contained in:
unknown
2022-05-26 23:34:29 -07:00
parent 95ba16cf2e
commit 60f6eb0df0
5 changed files with 176 additions and 84 deletions

View File

@@ -172,7 +172,6 @@ class Indexer():
for i in range(len(split)):
if split[i] not in tokens:
tokens[split[i]] = Posting(self.get_url_id(url), 1, i)
else:
tokens[split[i]].rtf += 1
tokens[split[i]].tf = (1 + math.log(tokens[split[i]].rtf))