-
Notifications
You must be signed in to change notification settings - Fork 74
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
WIP: Early draft owlet query expansion #1139
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Jim Balhoff <[email protected]>
Co-authored-by: Jim Balhoff <[email protected]>
@balhoff - have you tried building this branch? No matter what I try, I still get:
|
…to resolve version conflicts. Migrate to newer Jena API.
@matentzn this should build now. |
@balhoff this is a bit pushed back now, due to other priorities, but thanks a ton for sorting this out, will get to it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What’s the status on this? I would love to see this landing in ROBOT.
* | ||
* @author <a href="mailto:[email protected]">Nicolas Matentzoglu</a> | ||
*/ | ||
public class DLQueryCommand implements Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command is defined but never added to the CommandManager
.
|
||
List<List<String>> queries = getQueries(line); | ||
for (List<String> q : queries) { | ||
queryOntology(q, ontology, reasonerFactory, selects); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As implemented, it is very inefficient to run several queries against the same ontology, because there is no shared state between each query (in particular, no shared reasoner, even though the ontology cannot possibly change between each query, so initialising a brand new reasoner instance for each query is pointless).
From some tests I did with Uberon:
- running a single query takes ~11s;
- running 2 queries (
--query "query 1" output1.txt --query "query 2" output2.txt
) takes ~19s; - running 3 queries takes ~27s;
- and so on.
By contrast, with a modified version that uses a shared state:
- running a single query takes ~11s;
- running 2 queries takes ~11.2s;
- running 3 queries takes ~11.4s;
- and so on.
ManchesterOWLSyntaxClassExpressionParser parser = | ||
new ManchesterOWLSyntaxClassExpressionParser( | ||
ontology.getOWLOntologyManager().getOWLDataFactory(), | ||
new ShortFormEntityChecker(shortFormProvider)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I missed something, this doesn’t allow to do what is advertised in the documentation (using labels to refer to classes and relations). This only allows to use CURIEs, and it doesn’t even work with OBO-style CURIEs.
You’d rather want to use a QuotedEntityChecker
here:
QuotedEntityChecker qec = new QuotedEntityChecker();
qec.addProperty(ontology.getOWLOntologyManager().getOWLDataFactory().getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()));
// Optionally also allow to use `oboInOwl:shorthand`, so that one can use e.g. `part_of` instead of `'part of'`
qec.addAll(ontology);
@gouttegd I will never get to this now (I had some funding which since ran out and I cant take on coding tasks atm), but feel free to gut this PR of finish it: its yours if you want it :) |
I will consider finish it. Ultimately I want something to replace OWLTools’s |
Resolves #387
docs/
have been added/updatedmvn verify
says all tests passmvn site
says all JavaDocs correctCHANGELOG.md
has been updatedWIP.
At the moment I am trying to use Owlet in query preprocessing. There are too many errors I need some more experienced coder to help me with. For example, I am unable to install the required jena libs for Owlet
But this is not all, I still need to see how I can leverage Owlet for ROBOT template validation.