Spaces:
Configuration error
Configuration error
Update cross_encoder_reranking_train.py
Browse files
cross_encoder_reranking_train.py
CHANGED
@@ -128,6 +128,18 @@ def extract_text(content_dict, text_type="full"):
|
|
128 |
claims.append(value)
|
129 |
return " ".join(claims)
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
elif text_type == "tac1":
|
132 |
# Extract title, abstract, and first claim
|
133 |
title = content_dict.get("title", "")
|
|
|
128 |
claims.append(value)
|
129 |
return " ".join(claims)
|
130 |
|
131 |
+
elif text_type == "claimfeat":
|
132 |
+
# Extract all claims (keys starting with 'c')
|
133 |
+
content = []
|
134 |
+
for key, value in content_dict.items():
|
135 |
+
if key.startswith('c-'):
|
136 |
+
claims.append(value)
|
137 |
+
|
138 |
+
for key, value in content_dict.items():
|
139 |
+
for key1, value1 in content_dict["features"]:
|
140 |
+
claims.append(value1)
|
141 |
+
return " ".join(content)
|
142 |
+
|
143 |
elif text_type == "tac1":
|
144 |
# Extract title, abstract, and first claim
|
145 |
title = content_dict.get("title", "")
|