Skip to content

Commit

Permalink
fixing linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsbatista committed Apr 29, 2024
1 parent a219d84 commit 89ffc21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions haystack/document_stores/in_memory/document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def _compute_tf(token: str, freq: Dict[str, int], doc_len: int) -> float:
doc_len = doc_stats.doc_len

score = 0.0
for tok in idf.keys():
score += idf[tok] * _compute_tf(tok, freq, doc_len)
for tok, idf_score in idf.keys():
score += idf_score * _compute_tf(tok, freq, doc_len)
ret.append((doc, score))

return ret
Expand Down Expand Up @@ -259,8 +259,8 @@ def _compute_tf(token: str, freq: Dict[str, int], doc_len: float) -> float:
doc_len = doc_stats.doc_len

score = 0.0
for tok in idf.keys():
score += idf[tok] * _compute_tf(tok, freq, doc_len)
for tok, idf_score in idf.keys():
score += idf_score * _compute_tf(tok, freq, doc_len)
ret.append((doc, score))

return ret
Expand Down

0 comments on commit 89ffc21

Please sign in to comment.