Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge TripleStoreKnowledgeBase and TripleStore #497

Closed
wants to merge 2 commits into from

Conversation

Jean-KOUAGOU
Copy link
Collaborator

I have implemented a simple merge of TripleStore and TripleStoreKnowledgeBase. Tests work locally. Please review and merge

@Jean-KOUAGOU Jean-KOUAGOU requested a review from Demirrr November 25, 2024 15:28
@github-actions github-actions bot temporarily deployed to pull request November 25, 2024 15:35 Inactive
Copy link
Member

@Demirrr Demirrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't really merge TripleStoreKnowledgeBase and TripleStore but rather put already defined class of TripleStoreKnowledgeBase into TripleStore. What is the benefits of this ?

assert h
assert DLSyntaxObjectRenderer().render(h)
save_owl_class_expressions(h)
sparql = Owl2SparqlConverter().as_query("?x", h)
assert sparql
else:
pass
"""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove
if name == "main":
test_triplestore = TestTriplestore()
test_triplestore.test_remote_triplestore_dbpedia_tdl()

No need these three lines.

@@ -53,12 +52,16 @@ def test_remote_triplestore_dbpedia_tdl(self):
typed_neg = set(map(OWLNamedIndividual, map(IRI.create, examples["negative_examples"])))
lp = PosNegLPStandard(pos=typed_pos, neg=typed_neg)
h = model.fit(learning_problem=lp).best_hypotheses()
print(h)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to print

@@ -53,12 +52,16 @@ def test_remote_triplestore_dbpedia_tdl(self):
typed_neg = set(map(OWLNamedIndividual, map(IRI.create, examples["negative_examples"])))
lp = PosNegLPStandard(pos=typed_pos, neg=typed_neg)
h = model.fit(learning_problem=lp).best_hypotheses()
print(h)
assert h
assert DLSyntaxObjectRenderer().render(h)
save_owl_class_expressions(h)
sparql = Owl2SparqlConverter().as_query("?x", h)
assert sparql
else:
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass is problematic. This is not a really test


def __init__(self, url: str=None):
assert url is not None, "url must be string"
self.g = TripleStoreReasonerOntology(url=url)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. We cannot have TripleStoreOntology, TripleStoreReasoner, and TripleStoreReasonerOntology, can we ?

@Jean-KOUAGOU
Copy link
Collaborator Author

Jean-KOUAGOU commented Nov 29, 2024 via email

@Demirrr Demirrr requested review from Demirrr and alkidbaci December 2, 2024 08:22
@Demirrr
Copy link
Member

Demirrr commented Dec 2, 2024

@alkidbaci could you please review this PR ? Important that the existing merged class should work seamlsy with TDL, DRILL and others. Please note that it is important that TDL and DRILL work without a problem.

@alkidbaci
Copy link
Collaborator

alkidbaci commented Dec 2, 2024

I noticed that TripleStore class is now inheriting from KnowledgeBase which is against the main reason we have TripleStore class in the first place. Because of that we have to set the reasoner and the ontology of that class, and that's why we have TripleStoreOntology, TripleStoreReasoner and TripleStoreReasonerOntology at the same class.
It's kind of the right direction but not quite the right way.

TDL and Drill works. Drill tried only on family dataset.

These changes can be considered temporary but I suggest we have a more long lasting solution for this problem.

@github-actions github-actions bot temporarily deployed to pull request December 2, 2024 13:49 Inactive
@Demirrr Demirrr closed this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants