Spaces:
Configuration error
Configuration error
Update cross_encoder_reranking_train.py
Browse files
cross_encoder_reranking_train.py
CHANGED
@@ -129,8 +129,8 @@ def extract_text(content_dict, text_type="full"):
|
|
129 |
# Extract everything
|
130 |
all_text = []
|
131 |
# Start with title and abstract for better context at the beginning
|
132 |
-
if "title" in content_dict:
|
133 |
-
|
134 |
if "pa01" in content_dict:
|
135 |
all_text.append(content_dict["pa01"])
|
136 |
|
@@ -145,8 +145,10 @@ def extract_text(content_dict, text_type="full"):
|
|
145 |
filtered_dict = process_single_patent(content_dict)
|
146 |
all_text = []
|
147 |
# Start with abstract for better context at the beginning
|
148 |
-
|
149 |
-
|
|
|
|
|
150 |
|
151 |
# For claims, paragraphs and features, we take only the top-10 most relevant
|
152 |
# Add claims
|
|
|
129 |
# Extract everything
|
130 |
all_text = []
|
131 |
# Start with title and abstract for better context at the beginning
|
132 |
+
# if "title" in content_dict:
|
133 |
+
# all_text.append(content_dict["title"]) do with this on next
|
134 |
if "pa01" in content_dict:
|
135 |
all_text.append(content_dict["pa01"])
|
136 |
|
|
|
145 |
filtered_dict = process_single_patent(content_dict)
|
146 |
all_text = []
|
147 |
# Start with abstract for better context at the beginning
|
148 |
+
if "title" in content_dict:
|
149 |
+
all_text.append(content_dict["title"])
|
150 |
+
if "pa01" in content_dict:
|
151 |
+
all_text.append(content_dict["pa01"])
|
152 |
|
153 |
# For claims, paragraphs and features, we take only the top-10 most relevant
|
154 |
# Add claims
|