Gaëtan Caillaut
commited on
Commit
·
b8bf9f5
1
Parent(s):
0198e1b
Do not remove qids of entities whose type is unknown
Browse files- frwiki_good_pages_el.py +2 -1
frwiki_good_pages_el.py
CHANGED
@@ -304,11 +304,12 @@ class FrWikiGoodPagesELDataset(datasets.GeneratorBasedBuilder):
|
|
304 |
item.pop("wikipedia_description")
|
305 |
)
|
306 |
item["wikidata"] = item.pop("wikidata_description")
|
307 |
-
if qid is None or qid == ""
|
308 |
item["qid"] = ""
|
309 |
item["wikidata"] = ""
|
310 |
item["label"] = ""
|
311 |
item["aliases"] = []
|
|
|
312 |
item["type"] = "OTHER"
|
313 |
yield id, item
|
314 |
except:
|
|
|
304 |
item.pop("wikipedia_description")
|
305 |
)
|
306 |
item["wikidata"] = item.pop("wikidata_description")
|
307 |
+
if qid is None or qid == "":
|
308 |
item["qid"] = ""
|
309 |
item["wikidata"] = ""
|
310 |
item["label"] = ""
|
311 |
item["aliases"] = []
|
312 |
+
if item["type"] not in _ENTITY_TYPES:
|
313 |
item["type"] = "OTHER"
|
314 |
yield id, item
|
315 |
except:
|