Skip to content

Commit

Permalink
Remove redundant variable
Browse files Browse the repository at this point in the history
  • Loading branch information
louislefevre committed Apr 9, 2021
1 parent 878f289 commit 9470705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion retrieval/models/Model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def rank(self, qid: int, query: str) -> dict[int, float]:
passages = self._relevant_passages(qid, query_words)

scores = {}
for idx, pid in enumerate(passages):
for pid in passages:
scores[pid] = self._score_passage(pid, query_words)

ranks = sorted(scores.items(), key=lambda item: item[1], reverse=True)
Expand Down

0 comments on commit 9470705

Please sign in to comment.