Skip to content

Allow support for any input schema : the "ontology to class_info.json & relation_info.json" option #5

@GenEars

Description

@GenEars

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.

class_info.json
relation_info.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions