Datasets:
Tasks:
Text Classification
Sub-tasks:
multi-class-classification
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
relation extraction
License:
Update kbp37.py
Browse files
kbp37.py
CHANGED
@@ -208,15 +208,6 @@ class KBP37(datasets.GeneratorBasedBuilder):
|
|
208 |
tokens.pop(e2_start)
|
209 |
e2_end = tokens.index("</e2>")
|
210 |
tokens.pop(e2_end)
|
211 |
-
else:
|
212 |
-
print('Should not happen: ' + example)
|
213 |
-
tokens.pop(e2_start)
|
214 |
-
e2_end = tokens.index("</e2>")
|
215 |
-
tokens.pop(e2_end)
|
216 |
-
e1_start = tokens.index("<e1>")
|
217 |
-
tokens.pop(e1_start)
|
218 |
-
e1_end = tokens.index("</e1>")
|
219 |
-
tokens.pop(e1_end)
|
220 |
|
221 |
# some examples, like train/1276 are invalid (empty head/tail), and
|
222 |
# yield non-sensical examples without this check
|
|
|
208 |
tokens.pop(e2_start)
|
209 |
e2_end = tokens.index("</e2>")
|
210 |
tokens.pop(e2_end)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
|
212 |
# some examples, like train/1276 are invalid (empty head/tail), and
|
213 |
# yield non-sensical examples without this check
|