How do I use Manchester Syntax in WebProtege to group only some individuals from from a different class based on individual name - owl

I would like to create a new class PossibleNoduleFinding, grouping some individuals from another class Finding based on the individual name. Finding has a relationship hasFinding with each individual. Example maybe individual name nodule.
I'm trying:
Class: PossibleNodueFinding
Annotations: [in root-ontology]
rdfs:label "PossibleNoduleFinding"#en
SubClassOf: [in root-ontology]
SoftwareMapping
EquivalentTo: (Finding and hasFinding value nodule),
EquivalentTo: (Finding and hasFinding value density)
The Owl editor is not recognizing this syntax.

Related

OWL/Protege: Model inferred class of persons, who are not members of a group

I try to create an ontology in OWL, using Protégé 5.5.0. No I have a little trouble with inferred classes.
I have three classes: Agents and as subclasses Groups and Persons. Persons can be members of Groups. Now I want to create two inferred classes: a) "Members of groups" and b) "Not members of groups" (both as subclasses of Person)
I was successful with a), using the axiom equivalent class: Person and member_of some Group.
I created one individual, which is a person and member of a group and it was inferred to be member of the class "Members of groups".
Now I'm stuck with b). I tried several options for the equivalent class, for example:
Person and member_of max 0 Group
Or: Person and member_of exactly 0 Group
Or: Person and not member_of some Group
I created an individual which is a person but no groupmember. But the reasoner does not agree with me about the fact, that this individual should belong to the inferred class "Not members of groups".
What did I do wrong?
One way to achieve this in OWL, using your Person and not member_of some Group,
is to define a MemberOfGroup class that is defined as you suggested. Then define a NotMemberOfGroup class, that is disjoint with the MemberOfGroup class. If you now define your individual to be of type Person, as well as of type not member_of some Group, then your individual will be classified as belonging to the NotMemberOfGroup class.
The reason why you have to do this, is that OWL uses the open world assumption and hence it can only make inferences about things it knows for sure. I.e. saying that the individual is a Person, while making no statement regarding member_of provides the reasoner with zero explicit info to determine that the individual either belongs or does not to a group.
The other option is to use SHACL/SHEX/SPIN.

How to make reasoning of classes with property chain

I have an OWL2 ontology combining technological processes and numerical models. I need to find out, which process might be modeled with which model. I introduced Requirements, that areFulfilled by Process while Models hasRequirements. I am able to do it with individuals, but not classes.
I am using Protege 5.1, Fact++ reasoner.
Classes:
Processes
Proc1 EquivalentTo: Processes and (fulfillRestriction exactly 1 Req1)
Requirements
Req1 Equivalent to Requirements and (hasTemperature exactly 1 (temperature only xsd:double[ "5.0"^^xsd:double , <= "150.0"^^xsd:double])
Models
Model1 EquivalentTo: Models and (hasRestriction exactly 1 Req1)
Now I have an object property:
ObjectProperty: testIsModelOf
SubPropertyChain: hasRestriction o inverse (fulfillRestriction)
I defined individuals:
Individual: mod1
Types: Model1
Facts: hasRestriction requir1
Individual: requir1
Types: Req1
Individual: process1
Types:
Proc1
Facts: fulfillRestriction requir1
Asking for (with DLQuery):
Models that testIsModelOf some Proc1
If I define individuals for those three classes and define object properties between them, the result is as expected (DLQuery says mod1 is an instance of Models that testIsModelOf some Proc1). I expected that I will also get the Model1 class as a Direct Subclass (or equivalent class?) of the query result, but it does not happen. Is this possible to get the class, not only individual - without SWRL?

How to find overlapping classes?

Full ontology:
Prefix: : <http://www.semanticweb.org/l.smolaga/ontologies/2018/0/untitled-ontology-14#>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Ontology: <http://www.semanticweb.org/l.smolaga/ontologies/2018/0/untitled-ontology-14>
Datatype: xsd:int
DataProperty: hasAge
Characteristics:
Functional
Domain:
Person
Range:
xsd:int
Class: Person
Class: Student
EquivalentTo:
Person
and (hasAge some xsd:int[>= "18"^^xsd:int , <= "26"^^xsd:int])
Class: Teenager
EquivalentTo:
Person
and (hasAge some xsd:int[>= "11"^^xsd:int , <= "19"^^xsd:int])
I'm trying to find a way to check if two classes overlap.
For example let's consider we have an ontology with 3 classes (Person, Teenager and Student).
Teenager is equivalent to Person and hasAge some xsd:int[>= 11, <=19 ]
Student is equivalent to Person and hasAge some xsd:int[>= 18, <=26 ]
I want to check which class overlaps with Student. How I can do this using owlapi/jena ?
The easiest way will be to create an individual, say x, which is of type (Person and Student and Teenager). Invoke the reasoner and if your ontology is consistent, it means it is possible for an individual to belong to all classes. If the ontology is inconsistent, it means an individual cannot belong to all the classes simultaneously.
You should be able to do this in an ontology editor, or programmatically via the owl-api or jena.

Defining a class individuals as a combination of another class individuals

In an OWL ontology, given a class Student; I want to define another class StudentsPair, which is any pair of students, in such a way that automatically computes all the possible dual combinations of Student, i.e.
Student(x) and Student (y) --> StudentsPair(x,y)
I want StudentsPair as a class, not a property, because it may have additional features (such as averagePerformanceForPair, etc.).
For example,
Premise
Student(John)
Student(Alex)
Student(Mary)
-----------------
Conclusion
StudentPair((John, Alex))
StudentPair((John, Mary))
StudentPair((Alex, Mary))
The reasoner has to somehow create these new individuals! Is this possible?
You need an additional role student, then you can use Description Logic Rules, something like that might work:
Student ≡ ∃student.Self
student ◦ U ◦ student ⊑ StudentPair

In OWL, is it possible to query a class that does not have a property?

In OWL, is it possible to query a class that does not have a property?
Suppose I have an object property R and I want to retrieve all classes that do not have the property R. Also, suppose that I have already closed all classes with closures.
I was trying this:
suppose the propety in question is hasProperty, my query was this
hasProperty only Nothing
But it doesn't work
What do you mean by "class that does not have a property"?
Semantically, a class is a set of individuals and a property is a set of pairs of individuals. Given these two sets, what do you mean by "class has / has not a property"?
Regarding your example query
hasProperty only Nothing
lets rewrite it a bit so that we can think about it in natural language. This gives better intuition about the meaning of this query.
First lets rename hasProperty to follows (or whatever English verb), then we have:
follows only Nothing
This is semantically equivalent to
follows only (not Thing)
which is semantically equivalent to
not (follows some Thing)
Now we have gotten rid of the only which is a confusing part of OWL and is better avoided. So now we can verbalize the query in English as:
those who do not follow anything
or
who does not follow anything?
or more formally
which individuals of the ontology are known
not to have a follow relationship to any other individual
E.g. if your ontology states that
John does not follow Mary.
John does not follow himself.
Every individual in the ontology is either John or is Mary.
then John will be the answer to the above query.
You can also get a named class as the query answer if the asked restriction holds for a (named) group of individuals. In any case, the following must hold: if you asserted that the answer (or a member of it) does have a follow-relation to some individual then it would render the ontology inconsistent.
OWL does not have any means for querying the data. SPARQL is used for that. So the SPARQL query to find all class definitions that do not have the property :R would be:
SELECT ?cls
WHERE {
?cls a owl:Class .
FILTER NOT EXISTS {?cls :R ?o}
}

Resources