-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Is your feature request related to a problem? Please describe.
Discussing options to achieve the Allow support for any input schema (and not only the schemas generated by PyGraft) described in https://github.com/nicolas-hbt/pygraft?tab=readme-ov-file#upcoming-features
Describe the solution you'd like
Reverse engineering the current PyGraft implementation, notably looking at pygraft.kg_generator.InstanceGenerator.load_schema_info(), shows that no code change to PyGraft is needed to achieve the above-mentioned feature. For instance, translating an existing ontology implementation (e.g. in Turtle syntax) into the PyGraft class_info.json and relation_info.json data structures expected by PyGraft (see attached files) would be sufficient to benefit from the process inherent to the generate_kg task.
Hence, the quick win solution would be to implement some kind of UserDefinedSchema2PyGraftConfig side script.
Describe alternatives you've considered
Implementing a complementary InstanceGenerator class where the load_schema_info() method would directly take an ontology as input.
Additional context
It seems that the schema specifications, as per the current class_info.json and relation_info.json structures, could be sufficient for a first release of the UserDefinedSchema2PyGraftConfig script and the generate_kg task.