antimoda1 commited on
Commit ·
3302068
1
Parent(s): c4974cc
hotfix
Browse files- retrieval.py +1 -9
retrieval.py
CHANGED
|
@@ -178,15 +178,7 @@ class Retrieval:
|
|
| 178 |
paragraph_scores = df.groupby('paragraph_id')['score'].max().reindex(self.paragraphs_df['paragraph_id']).fillna(0)
|
| 179 |
return paragraph_scores
|
| 180 |
|
| 181 |
-
def search(self, query: str
|
| 182 |
-
"""
|
| 183 |
-
Args:
|
| 184 |
-
query: Текст запроса
|
| 185 |
-
target_summary: Ожидаемый summary
|
| 186 |
-
"""
|
| 187 |
-
print(f"{'='*90}")
|
| 188 |
-
print(f" ✓ Target summary: '{target_summary}'\n")
|
| 189 |
-
|
| 190 |
bm25_scores = self.bm25_search(query)
|
| 191 |
semantic_scores = self.semantic_search(query).numpy()
|
| 192 |
bm25_scores = normalize_array(bm25_scores)
|
|
|
|
| 178 |
paragraph_scores = df.groupby('paragraph_id')['score'].max().reindex(self.paragraphs_df['paragraph_id']).fillna(0)
|
| 179 |
return paragraph_scores
|
| 180 |
|
| 181 |
+
def search(self, query: str) -> None:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
bm25_scores = self.bm25_search(query)
|
| 183 |
semantic_scores = self.semantic_search(query).numpy()
|
| 184 |
bm25_scores = normalize_array(bm25_scores)
|