Corpus-Cypher-Executable/cce/necessary files/strip.py

27 lines
373 B
Python
Raw Normal View History

2022-04-22 13:50:27 +00:00
import json
f1 = open('common.json', 'r')
f2 = open('extended.json', 'r')
data1 = json.load(f1)
data2 = json.load(f2)
f1.close()
f2.close()
words1 = []
words2 = []
for key in data1:
words1.append(key)
for key in data2:
words2.append(key)
dict = {
'common':words1,
'extended':words2
}
f = open("dictionary.json", "w")
json.dump(dict, f)
f.close()
print("done")