Spaces:
Sleeping
Sleeping
Shakshi3104
commited on
Commit
·
85c3441
1
Parent(s):
2cca64b
[fix] remove query text
Browse files- model/search/bm25.py +2 -3
model/search/bm25.py
CHANGED
@@ -134,13 +134,12 @@ class BM25SearchClient(BaseSearchClient):
|
|
134 |
# ランキングtop-nをクエリ毎に取得
|
135 |
result = []
|
136 |
for query in tqdm(query_tokens):
|
137 |
-
query_text = "".join(query)
|
138 |
df_res = self.model.get_top_n(query, self.corpus, n)
|
139 |
-
|
140 |
df_res["rank"] = deepcopy(df_res.reset_index()).index
|
141 |
df_res = df_res.drop(columns=["tokenized"])
|
142 |
result.append(df_res)
|
143 |
|
144 |
logger.success(f"🚦 [BM25SearchClient] Executed")
|
145 |
-
|
146 |
return result
|
|
|
134 |
# ランキングtop-nをクエリ毎に取得
|
135 |
result = []
|
136 |
for query in tqdm(query_tokens):
|
|
|
137 |
df_res = self.model.get_top_n(query, self.corpus, n)
|
138 |
+
# ランク
|
139 |
df_res["rank"] = deepcopy(df_res.reset_index()).index
|
140 |
df_res = df_res.drop(columns=["tokenized"])
|
141 |
result.append(df_res)
|
142 |
|
143 |
logger.success(f"🚦 [BM25SearchClient] Executed")
|
144 |
+
|
145 |
return result
|