File size: 284 Bytes
5f9d9e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import json
entity2id = "entity2id.json"
entity2id = json.load(open(entity2id, "r"))
itemids = "item_ids.json"
itemids = json.load(open(itemids, "r"))
itemnames = [k for k, v in entity2id.items() if v in itemids]
with open("itemnames.json", "w") as f:
json.dump(itemnames, f) |