The following functions from owlapy import owl_expression_to_sparql, owl_expression_to_dl work like a charm to convert an instance of OWL Class Expressions Class into string.
It would be great if we could implement owl_expression_to_sparq_confusion_matrix and owl_expression_to_sparql_exist function
If you have any better nameing, the name of the function can be changed.
Some of the input arguments (E.g. values, for_all_de_morgan,named_individuals can be ignred for the time being) can be ignored for the time being
The goal is to omit return the result of the SPARQL query but only returning the 4 scalar values representing the quality of an OWL Class expression given positive and negative examples.
Below, we have the computation of tp, fp, fn, and tn
The following functions
from owlapy import owl_expression_to_sparql, owl_expression_to_dl
work like a charm to convert an instance of OWL Class Expressions Class into string.It would be great if we could implement
owl_expression_to_sparq_confusion_matrix
andowl_expression_to_sparql_exist
functionThe goal is to omit return the result of the SPARQL query but only returning the 4 scalar values representing the quality of an OWL Class expression given positive and negative examples. Below, we have the computation of
tp
,fp
,fn
, andtn
def owl_expression_to_sparql_exist()->Boolean
This function returns True of False depending on whether a single OWLNamedIndividual occurs in the result set