GithubHelp home page GithubHelp logo

Comments (6)

mdebellis avatar mdebellis commented on July 3, 2024

from protege.

mdebellis avatar mdebellis commented on July 3, 2024

What is the appropriate thing to do in cases like this? Should I mark the issue as resolved? On the one hand, knowing that it is inferred works for me but on the other I would think the team would want to fix this in the next version of Protege so perhaps I shouldn't mark as closed?

from protege.

sultanifar avatar sultanifar commented on July 3, 2024

from protege.

mdebellis avatar mdebellis commented on July 3, 2024

Sultanifar: Either I'm not understanding you or I think you are incorrect. You seem to be saying there is no need for the reasoner to infer the inverse domain/range. If that is what you are saying I don't agree. In fact, that is not the way OWL and Protege usually work, at least for the reasoners I use. It is normal for the reasoner to add the domain and range for the inverse property and to display it in the UI. Moreover, IMO that is absolutely the correct thing to do. Yes, you could make that inference at run time but actually making the inference when you are designing the ontology will help you spot potential errors faster. Also, the same goes for reasoning. You could make the inference about the domain and range at run time but that would be slower (every time you assert a value you need to infer the domain and range of an inverse). Doing it at design time is both faster (you just do it once) and helps people understand the ontology. This is a minor bug, but IMO it is still a bug and it would be better if in the next version of Protege the domain and range were visible in the GUI when you use 'Class1 or Class2' as they are when you just make the domain or range a single class. Actually, I usually try to avoid using "Class1 or Class2" and in most cases where I would use this I take it as a good indication that there should be some common superclass for both Class1 and Class2 (which is what the reasoner does anyway: creates a common anonymous superclass). But that's not always the case and once in a while having two or more classes can be the right way to model things.

from protege.

sultanifar avatar sultanifar commented on July 3, 2024

Sorry for late response. The only important thing I wanted to say was that the example I gave in my first (and removed) comment was not an evidence to deduce that the inference is done and the matter is only about the UI. You can turn off the "Domains" and "Ranges" checkboxes from the "Reasoner" tab in Protégé preferences and see that the example still works and 'building' will become an instance of 'Building'

Assume we have two object properties called r1 and r2 which are the inverses of each other. And we have two classes A and B which are respectively the domain and range of r1. Now if for two individuals like x and y we have "x r2 y" then it will be inferred that "y r1 x" (since r2 and r1 are the inverses of each other) and since A and B are the domain and range of r1, it will be inferred from "y r1 x" that y is an instance of A and x is an instance of B even if the domain and range of r2 are not inferred.

We always have both "x r2 y" and "y r1 x" and if the domain and range of r2 are inferred, there are two ways of inferring that x is an instance of B: One using "y r1 x" and the range of r1 and the other using "x r2 y" and the domain of r2 but one of them is enough. This led to the off-topic talk about redundant computations (my apologies for that).

The thing I'm currently wondering about is that even if you turn off the domain and range inference checkboxes and run the following query in your example ontology (using Snap SPARQL) it shows that "Location" is the domain of "isLocationOf" (Is it still somehow inferred despite turning off the checkboxes?):

`
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX : <http://www.semanticweb.org/mdebe/ontologies/2024/2/untitled-ontology-392/>

SELECT ?p ?d WHERE {
?p rdf:type owl:ObjectProperty .
?p rdfs:domain ?d .
FILTER (?d != owl:Thing )
}
`

from protege.

mdebellis avatar mdebellis commented on July 3, 2024

I see your point about the inverses.

Is it still somehow inferred despite turning off the checkboxes?

I'm not sure but probably. I've seen this before where I uncheck some box in the reasoning preferences but the reasoner does them anyway. The one I uncheck is reasoning about super properties for data properties. There are times that can be useful but other times when it results in a lot of useless redundant data. I've tried turning it off but many reasoners still infer it anyway. Pellet does. I actually wrote a SPARQL query to get rid of that data. It's not useful for Protege because I run the reasoner so often but it is useful when I use AllegroGraph or other triplestores where I don't run the reasoner as often and when I do it is usually as part of code so it is fairly easy to include the SPARQL query to clean up the extra data afterwards. If anyone is interested I have it in a Github repository where I store a bunch of generally useful SPARQL queries: Delete Super Property Values SPARQL file

from protege.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.