Protege reasoner's equivalent conclusion - owl

I have found this issue while developing an ontology. I am making ontology over the basic family relations.
I have a main class called Person, which contain sub-classes like Son, Daughter, Wife etc.
Along with this I defined object properties like isGrandsonOf and isGranddaughterOf to show the relation grandparent-grandchild.
Issue is that whenever I start the reasoner, it tell me that isGranddaughter and isGrandson is exactly the same. It vary is such aspects as: Domain (female subclasses are disjoint with male one) and Disjoints, as the screens shows. Could someone please explain this to me? I am not sure how to declare these two object properties being unequal. I am using either FaCT++ or Pellet reasoner.
Both first and second image shows how object property, in inferred as equal, meanwhile I do not want isGrandsonOf and isGranddaughterOf to be the same object property. They both refer to people with different sex:
image 1
image 2

Related

How to get the reasoner to "start" with city A and get the rest of the cities that is linked by Transitive property

I am building an ontology in Protege. In this exemple I have 7 individuals of the "City" class (from "City_A" to "City_G" (North to South)). I want to create classes ('CitysNorthOf_D') that only shows the individuals of 'StartCity' (is a subclass of City), and all the individuals which are located north (above) of 'StartCity' (City_E, City_F and City_G). In the real ontology I have more citys and properties. This is just one example to show the issue:
Examples of object properties:
'road': Transitive + Symmetric (but have no purpose for this issue)
'south': Transitive (link one Individual 'City' to the Individual 'City' below current Individual. For example City_A have: south = City_B.
'north': Transitive (same as 'south' but links the city above.
What I want to do are different classes that are looking for cities under different conditions(axioms). All using Transitive in properties to link cities together and all Classes 'start' from the Individual that have subclass 'StartCity'(from 'City').
With the help of properties that link different cities together (eg for link properties: south, north, road type, distance etc and for cities: size, type (city, village, suburb) etc).
Examples of classes and their conditions:
All cities located north from the start city.*
Same as above but only in two steps (all cities located two or less cities north of the start city.*
All cities that can be reached by motorway (have not added type of road type in this example).*
All cities that can be reached without going through a larger city (size).*
*= All classes start from start city marked with a subclass to city named 'Start_City'
Want these classes to work independently of each other. But when I do two classes with the following in "Equivalent To": "StartCity or City that south some StartCity", only one class works(last one).
I have tried the follow in "Equivalent to":
StartCity or City that south some StartCity
It shows the right Individuals in the list 'Instances' of the 'Description' view for the class.
But...
If I add a new class with the exact same axiom. The both classes do not work. Only the last one. The class work separately but not when other similar classes exist.
I just want to use the axioms in the classes to do this.
What do I wrong? Is it possible? Or have I misunderstood how to use axioms in classes or should I test the class in another way?

How to enter email address as object in Protégé?

When using OWL, it's useful to declare a property for personal email as owl:InverseFunctionalProperty as it is for foaf:mbox. While using OWL Full that could be done for datatype properties, in OWL DL, it needs to be an object property as object and datatype properties are disjoint there. Yet, most tools have no issue with that.
Now I need to use Protégé to prepare an exercise. It doesn't allow to declare a datatype property owl:InverseFunctionalProperty and it doesn't allow to have email address as object of an abject property. When encoded externally, as expected, Protégé treats it as annotation property.
Is there a workaround?
Option 1
Declare foaf:mbox as a datatype property and use OWL 2 keys.
Option 2
Define the mailto prefix as mailto: (i. e. #prefix mailto: <mailto:> .) on the "Ontology prefixes" tab.
Then type mailto:me#example.org in the "Create a new OWLNamedIndividual" dialog.
Without such definition, Protégé doesn't process mailto:me#example.org correctly, allowing to type mailto://me#example.org only.

Multiple dependent controllers/directives on a single page?

I want to display something like this in a single page. The complication is that this data comes from 4 different sources.
City One
Property One
Property Two
Property Three A
Property Three B
Property Three C
City Two
Property One
Property Two
Property Three A
Property Three B
Property Three C
City Three
Property One
Property Two
Property Three A
Property Three B
Property Three C
City - comes from JSON A, which returns a simple array of n objects containing name and id.
Property One comes from JSON B (using City.id as a parameter in the URL), returning one set of objects specific to City.id.
Property Two comes from JSON C (using City.id as a parameter in the URL), returning one set of objects specific to City.id.
Property Three A/B/C comes from JSON D (using an key field returned in Property Two), returning one set of objects specific to a particular property key specified in Property Two.
Is this even doable? I'm aware that this requires 3n+1 semi-synchronous JSON calls. At this point I don't know if I should be looking for help on controllers or directives or some kind of crazy routing or what.
I'm a total noob at Angular (I come from an ASP.NET MVC background) and I can't wrap my ahead around this. I've been trying to follow John Papa's Style Guide, so there isn't a $scope to be found anywhere in my code, which is severely limiting my understanding of some pages I've looked up to solve this.

How to get individual results while solving Einstein's riddle with OWL in Protégé?

I would like to better understand ontologies and reasoning. There is an interesting puzzle called Einstein's riddle on the net that can be solved with the help of ontologies and reasoning. I downloaded the OWL ontology from that site and imported it into Protege 4.0.2 (does not work with 4.1). I can start a reasoner by Reasoner → FaCT++, Reasoner → Classify…, but i don't know, how to visualize the individual results. How can I do this?
There are two ways in which you can visualise the results. Firstly, when you select the "Classes" Tab, you will see that there are two views available to you: the "Class hierarchy" view, which is the asserted taxonomy and the "Class Hierarchy View (inferred)", which is, as the name suggests, the inferred one. That gives you the class views. As Kaarel suggests, you can visualise the individuals reasoning in the Individuals tab.
Protege also allows you to add a number of other individuals views to the UI: make a new empty tab and then choose a view from the "Individuals View" sub-menue under the "Views" menue. Finally, you can use a number of external graphical tools to visualise: if you assert the inferred hierarchy and save it out to a file (in RDF-XML), you can then use tools such as Welkin, IsaViz etc. to get graphical representations.
After the reasoner has finished go to the Individuals-tab and look for axioms that have a yellow background. These axioms are the entailed ones. If the components of the puzzle (i.e. the men, pets, drinks, etc.) have been modeled as OWL individuals then you would see some new object property assertions that the reasoner has found between these individuals.
There are also other options for seeing the entailments:
View -> Ontology views -> Classification Results will show the list of entailed axioms. It might not show all the entailed axioms though, e.g. I've tried it with Protege 4.1 and didn't see any entailed object property assertions.
In the DL Query tab you can type in a class expression and have all its subclasses and individuals (including the entailed ones) listed. This might be the most natural way of exploring the entailments.
See also:
ACE View examples: contains the "Zebra Puzzle" example, works in Protege 4.1
Stackoverflow question: Solving “Who owns the Zebra” programmatically?: doesn't yet contain the OWL-based solution :(

Using relationship/foreign key with linq2sql?

Can anyone help?
I have a created a relationship between my Reservation(prim key) and Insurance(for key) tables and imported into linq2sql and checked my automatically created c# files and sure enough i have reservation.MyFieldNames etc etc PLUS reservation.Insurance which is my relationship but reservation.Insurance i can't see the fieldnames of Insurance - am i missing something?
Do i have to call a GetInsurances or something? I don't see anything.. In fact Insurance is of type Linq.entityset???
Also i was hoping to create my reservation table (which was nice and easy) and then automatically "INJECT" a Insurance (i.e. 1 to many) from Ilist or something..
Is this not possible,
Any help really appreciated
p.s. I did create my automatically created c# dto files via T4 Toolbox but this shouldn't make any difference. I just have a separate file for each entity..
Not 100% sure what you mean by "I don't see anything".
Assuming you have a Reservations table and an Insurance table which references the "reservations" - what kind of relationship is this? 1:1 ? 1:many ? Which way around?? Can you post a screenshot of your DBML designer surface? (upload it to www.tinypic.com and include the link as an image here in your question)?
The "Reservations" class will contain one instance of an "Insurance" (EntityRef<Insurance>) or a list (EntitySet) of "Insurance" objects (EntitySet<Insurance>) - depending on the nature of the relationship - and you should be able to navigate those in code, e.g.
string foo = myReservation.Insurance.CustomerName; // or whatever
You won't see those on the designer surface - that's just a link to another class somehwere on your design surface, right?
Same goes for the other way around - if the Insurance is associated with exactly one Reservation, you should be able (in code) to do:
string bar = myInsuranceObject.Reservation.MyFieldName1; // or whatever
So it's not quite clear to me which case you're really referring to - can you elaborate on your question a bit more and make it clearer??
Based on the NerdDinner sample, I'll try to elaborate. Check out the DBML design surface:
Here, you don't see any of the properties used to move back and forth between the objects. But you do see that the "RSVP" class has a "DinnerID" foreign key which links it to the "Dinner" class. So this is a 1:n relationship: one Dinner has n RSVP's, and every RSVP is for exactly one Dinner.
In your code, you see these created properties now - check out the RSVP class first:
You can see that the RSVP class has a EntityRef<Dinner> - a reference (link) to exactly one Dinner - that dinner that this RSVP is for.
On the other hand, the Dinner class has a whole list of RSVPs of all the geek planning to attend that dinner!
So in the Dinner class, you have a EntitySet<RSVP> - a whole list of attendees, which you can then navigate when you're working with your Dinner class.
Does this make things a bit clearer?
Marc

Resources