I am a complete newbie to Python.
I have data in the following format :
ontology = {
'OBJECT' :
{'IS-A' : {'VALUE' :'ALL'},
'SUBCLASSES' : {'VALUE' :['PHYSICAL-OBJECT',
'MENTAL-OBJECT','SOCIAL-OBJECT']},
'THEME-OF' : {'sem' : 'EVENT'}},
'PHYSICAL-OBJECT' :
{'IS-A' : {'VALUE' :'OBJECT'},
'SUBCLASSES' : {'VALUE' :['ANIMATE', 'INANIMATE']},
'THEME-OF' : {'sem' : 'EVENT'}},
}
I want to load all this data into a Python dictionary. But I get an error if I used the eval(file.read()).
Is there any way I can do this? (I don't have any class definitions)