I am new to owl. I read an Universal Quantification example in this page http://dior.ics.muni.cz/~makub/owl/ .
If I replace "Person SubClassOf hasParent max 2 thing" by "Person SubClassOf hasParent max 2 Person" and run the reasoner, I think individual Ivan would fall into the class Czech too. But actually it's not. I test it in Protege 4.3 and run the built-in reasoner FaCT++.
What details did I miss?
The problem here that your new restriction is too permissive. Your new axiom actually say that Person can have at most 2 (parents that are Person). It doesn't prevent Person from having other parents, that are non-Person.
The example will work again if you enforce all parents to be of a class Person, e.g by setting Range of hasParent to Person, or adding an axiom Person SubClassOf hasParent only Person
Related
I am new to ontology design, and I have a project that requires me to match some individuals if they point to the same values for some of their properties.
I've posted some screenshots with the classes, object properties, data properties and individuals here:
https://imgur.com/a/Ak4og
A more "in detail" explanation(CAN ALSO BE DEDUCED FROM THE PICS): I have the class Person, who has a subclass Expert. There are also class FieldOfPractice(subclasses: computer_science, engineering, public_administration, etc.), Expertise(very_low,low,moderate,high,very_high) and Certification(A,B,C,D), Book and Expertise_Community classes.
I have as data properties firstName, lastName, dateAdded, bookName, communityName.
Each Person (so also Expert) has to have hasCertification, hasExpertise, hasFieldOfPractice properties which will all have the obvious range.
The Expert has to have recommendedBooks() and isInExpertCommunity properties.
The requirement: Create some Individuals of type Person, Expert, Book,etc. Make an "inference algorithm" such that for each person who has the same certification, expertise and field of practice as any of the experts, recommendedBooks() and isInExpertCommunity properties are inferred from the corresponding Expert Individuals to the Person Individual.
So for example lets say that: We have an individual Person: Mr.A , who has as object properties hasFieldOfPractice() computer_science, hasCertification() B, hasExpertise() very_low.
We also have an individual Expert: Expert5 with the same values for hasFieldOfPractice(), hasCertification() and hasExpertise() as Mr.A. Expert5 has as recommendedBooks() book1, book6 and for isInExpertiseCommunity() community4.
The "inference algorithm" should infer to Mr.A the recoomendedBooks() book1, book6 and isInExpertiseCommunity() community4. It should also do this if Mr.A matches with another expert who points at different books for reccomendedBooks() and/or another expertise community.
I have also found some similar questions but haven't been able to link the answers properly to my problem:
How to infer isBrotherOf property between two individuals - very good answers, but I need to change the SameAs() property instead of hasBrother() from the question.
Using Property Chains to get inferred Knowledge in an OWL Ontology(Protege) - same problem, but here my SameAs() which I think its predefined, corresponds with the example's employs().
From what I've seen I have to link somehow the sameAs() -> property chain -> rollification concepts, but I don't really get it yet.
so I used pizza ontology, and tried to do some competence questions below using SPARQL
what kind of pizza are there?
is topping necessary for pizza?
here's what I've come to understand so far:
I try to list pizza's subclasses by this query
SELECT ?p WHERE { ?p rdfs:subClassOf pizza:Pizza }
it only display NamedPizza, I understand why, because NamedPizza is the only class that has direct subclass relationship, meanwhile other class like CheeseyPizza is owlEquivalentClass with certain attributes, and American is subclass of NamedPizza. So, if I want to list all the kind of pizza in this ontology, including CheeseyPizza and American, what query will it be?
related to 2nd question, since Pizza definition is only mention that it has PizzaBase, and PizzaTopping only mentioned in specific Pizza subclass/equivalentClass (for example: CheeseyPizza has CheeseTopping), how to test that a Pizza must have PizzaTopping or not?
I'm building an ontology to find peoples' skills. I want to infer that when a person A passed a course B and course B provides skill C, then person A has skill C. Is there a way to do this in Protégé?
Sure, you're saying that when you have:
A →passed B →providesSkill C
you want to infer that
A →hasSkill C
You can do that with the subproperty chain axiom:
passed • providesSkill ⊑ hasSkill
For a more detailed example of how to add these in Protege, see the (not quite a duplicate) question: Adding statements of knowledge to an OWL Ontology in Protege).
I just started learning OWL using Protégé 4.3, and now I am facing a difficult problem. I have defined a class A with some restriction superclasses that ensure that each A has a property value from P1 and P2, and each P1 and P2 have a value that is a double:
A ⊑ ∃hasProperty.(P1 ⊓
∃hasValue.xsd:double)
A ⊑ ∃hasProperty.(P2
⊓ ∃hasValue.xsd:double)
How can I assert that P1 values of an A are all less than all the P2 values?
You can't do this with OWL Axioms
This is an interesting problem, but it's one that you can't solve using pure OWL axioms, unfortunately. Generally, it's easy to say something about the values that individuals of class have, by using restriction superclasses, but it's hard or impossible to say something about the relationship between values of properties. E.g., you can't say that the family name property of a person must be the same as the value of the surname property.
It's important to clear up a bit of terminology, first, though, particularly the term restriction in:
I want to define a restriction,for all Individuals of A,value of p1 is
always less than value of p2
A restriction is a class. E.g., the restriction likes some Person is the class of individuals each of which likes some Person. We often use restrictions as superclasses of other classes to ensure that certain constraints hold. E.g., when we say that
Person subClassOf hasName some xsd:string
we're saying that every person has a value for the property hasName that is an xsd:string.
You probably can do this with SWRL
You could assert that if something is a member of A and has p1 and p2 values, then p1 must be less than p2. This would look like:
A(?a) ∧
hasProperty(?a,?p1) ∧ P1(?p1) ∧ hasValue(?p1,?v1) ∧
hasProperty(?a,?p2) ∧ P2(?p2) ∧ hasValue(?p2,?v2)
→
swrlb:lessThan(?v1,?v2)
This will ensure that every P1 value on an A is less than every P2 value on the A. If you ever assert some data that violates this, then there will be an inconsistency.
In my ontology I have individuals "pic Joan" which is an instance of concept "mountain" and "port Cerbère" which is an instance of concept "village". I have the relation "dominates" going from "pic Joan" to "port Cerbère" (in the sense that the mountain is perceived as being close and above the village, and hence "dominates it").
But in fact, I need to represent the information "pic Joan dominates port Cerbère at a distance of 1.5 miles NW".
So, logically, I would need to attach to the relation "dominates" the data properties "distance=1.5M", "direction=NW".
But, AFAIK, OWL does not provide properties for relations. I know that I can define range and domain for relations, but this is not about range and domain, the same relation will have different property values when taken between different instances.
How would you represent this information in OWL?
(Auxiliary question: is there some other ontology formalism where I can define properties for relations? And if yes, are there tools like Protégé to manage ontologies in that formalism?)
The most common pattern for this use case is to introduce a new class, say RelativePosition:
RelativePosition a Class.
relationType a DataProperty.
relationType domain RelativePosition.
// relationType values not specified here: might be "dominant","overlooking"...
// depending on your needs, this might need more structure.
firstFeature a ObjectProperty.
firstFeature domain RelativePosition.
secondFeature a ObjectProperty.
secondFeature domain RelativePosition.
// both properties can appear multiple times for one instance of RelativePosition
// to group sets of entities which share a relative position
More properties can be added to introduce distance, or other characteristics.
Edit: copied link from Joshua's comment below: for n-ary relations, see here
is there some other ontology formalism where I can define properties for relations?
Have you looked into Topic Maps?