dice-group / owlapy

OWLAPY is a Python Framework for creating and manipulating OWL Ontologies.
MIT License
16 stars 1 forks source link

OWL2SPARQL Converter ForAll Alternative #39

Closed nkaralis closed 5 months ago

nkaralis commented 5 months ago

Introduces an alternative for the ForAll mapping based on De Morgan's laws.

NOTE: The interface (arguments) of the converter have changed. Might break some stuff in Ontolearn

Demirrr commented 5 months ago

@alkidbaci Could you review it today if you have time ?

alkidbaci commented 5 months ago

Sure thing

nkaralis commented 5 months ago

Thanks for reviewing the PR.

Regarding the first point, the idea here is that OWLObjectComplementOf iterates over all entities of the graph, whereas other expressions are restricted based on a type. We could also remove the comments and have both.

Regarding the second point, we could add an extra argument de_morgan_for_all: bool = True. What do you think?

alkidbaci commented 5 months ago

Regarding the first point, the idea here is that OWLObjectComplementOf iterates over all entities of the graph, whereas other expressions are restricted based on a type.

Well, that's a fair point. We can leave it like that then.

Regarding the second point, we could add an extra argument de_morgan_for_all: bool = True. What do you think?

Now that I think again about this, people will get used to using the owl_expression_to_sparql method and that's also the way we recommend in the documentation on how to convert owl to sparql... so I suggest adding that argument. Hope you don't mind doing that.

Thanks for the PR!