petermr / dictionary

Collection of Wikidata-based dictionaries for scientific annotation and searching
Apache License 2.0
7 stars 4 forks source link

DictionaryEditor: Jupyter Notebook to Check and Validate Dictionaries #1

Open ShweataNHegde opened 3 years ago

ShweataNHegde commented 3 years ago

Here is the link to the Juypter Notebook: https://github.com/petermr/dictionary/blob/main/update.ipynb
This Jupyter Notebook contains code to:

This is the output of the last cell:

file:  C:\Users\shweata\dictionary\openVirus\country.xml

root  C:\Users\shweata\dictionary\openVirus\country.xml :  dictionary  ~  {'title': 'country'}
entries 264
False
file:  C:\Users\shweata\dictionary\openVirus\bad.xml

root  C:\Users\shweata\dictionary\openVirus\bad.xml :  dictionary  ~  {'title': 'simple'}
unknown:  unknownatt
entries 2
False
file:  C:\Users\shweata\dictionary\openVirus\country.xml

root  C:\Users\shweata\dictionary\openVirus\country.xml :  dictionary  ~  {'title': 'country'}
entries 264
False
file:  C:\Users\shweata\dictionary\openVirus\disease.xml

root  C:\Users\shweata\dictionary\openVirus\disease.xml :  dictionary  ~  {'title': 'disease'}
entries 13836
False
file:  C:\Users\shweata\dictionary\openVirus\drug.xml

root  C:\Users\shweata\dictionary\openVirus\drug.xml :  dictionary  ~  {'title': 'drug'}
entries 1505
True
file:  C:\Users\shweata\dictionary\openVirus\funder.xml

root  C:\Users\shweata\dictionary\openVirus\funder.xml :  dictionary  ~  {'title': 'funder'}
entries 13110
False
file:  C:\Users\shweata\dictionary\openVirus\npi.xml

root  C:\Users\shweata\dictionary\openVirus\npi.xml :  dictionary  ~  {'title': 'npi'}
entries 40
True
file:  C:\Users\shweata\dictionary\openVirus\simple.xml

root  C:\Users\shweata\dictionary\openVirus\simple.xml :  dictionary  ~  {'title': 'simple'}
entries 2
True
file:  C:\Users\shweata\dictionary\openVirus\testTrace.xml

root  C:\Users\shweata\dictionary\openVirus\testTrace.xml :  dictionary  ~  {'title': 'testTrace'}
entries 37
False
file:  C:\Users\shweata\dictionary\openVirus\virus.xml

root  C:\Users\shweata\dictionary\openVirus\virus.xml :  dictionary  ~  {'title': 'virus'}
entries 118
False
file:  C:\Users\shweata\dictionary\openVirus\zoonosis.xml

root  C:\Users\shweata\dictionary\openVirus\zoonosis.xml :  dictionary  ~  {'title': 'zoonosis'}
entries 30
True
'   \ndeletedIds = set(["Q123", "Q234"])\nfile = os.path.join(OPEN_VIRUS, "country.xml")\nfile1 = os.path.join(OPEN_VIRUS, "bad_country.xml")\nnewroot= edit(file, deletedIds)\nxml = ET.tostring(newroot, encoding="UTF-8")\nprint("X "+xml)\n'

Some of our dictionaries aren't validate against the schema. We'll need to find out why.