Spaces:
Configuration error
Configuration error
Update cross_encoder_reranking_train.py
Browse files
cross_encoder_reranking_train.py
CHANGED
@@ -136,6 +136,7 @@ def extract_text(content_dict, text_type="full"):
|
|
136 |
content.append(value)
|
137 |
if key == "features":
|
138 |
content += list(content_dict[key].values())
|
|
|
139 |
|
140 |
elif text_type == "feat":
|
141 |
# Extract all claims (keys starting with 'c')
|
@@ -143,6 +144,7 @@ def extract_text(content_dict, text_type="full"):
|
|
143 |
for key, value in content_dict.items():
|
144 |
if key == "features":
|
145 |
content += list(content_dict[key].values())
|
|
|
146 |
|
147 |
elif text_type == "tac1":
|
148 |
# Extract title, abstract, and first claim
|
|
|
136 |
content.append(value)
|
137 |
if key == "features":
|
138 |
content += list(content_dict[key].values())
|
139 |
+
return " ".join(content)
|
140 |
|
141 |
elif text_type == "feat":
|
142 |
# Extract all claims (keys starting with 'c')
|
|
|
144 |
for key, value in content_dict.items():
|
145 |
if key == "features":
|
146 |
content += list(content_dict[key].values())
|
147 |
+
return " ".join(content)
|
148 |
|
149 |
elif text_type == "tac1":
|
150 |
# Extract title, abstract, and first claim
|