Basic Inference problem

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic Inference problem

tomekldc
This post was updated on .
Hi,

I have a minor issue getting the inference I'm expecting.
I have an ontology specialized in the field of the aeronautics (here
attached, a sub-ontology).
In my universe, there is an class:Aircraft (individual:myA320) which has
exactly 1 class:FlightPlan (ind:FlightPlan)
This class:FlightPlan has some class:waypoint attached ind:{W2,W3,W4}

In my head, it sounds that if An Aircraft has a FlightPlan, it will have
implicitly has waypoints as well
I have checked it under the DL Query :
> Aircraft and (hasWaypoint value W1)
I'm expecting : myA320
It returns : Nothing.


Could someone explain me where I'm wrong, please ?
Thank you for your time,


PS: I'm trying to use the "Punning" process : "Treating classes as instances
of metaclasses (Class ↔ Individual)". It moight be the cause of the issue.


File attached: MissionAircraft_Sample.owl



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
protege-user@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

marksem
I don't see an attachment.

-----Original Message-----
From: protege-user <[hidden email]> On Behalf Of tomekldc
Sent: Thursday, February 13, 2020 6:50 AM
To: [hidden email]
Subject: [protege-user] Basic Inference problem

Hi,

I have a minor issue getting the inference I'm expecting.
I have an ontology specialized in the field of the aeronautics (here attached, a sub-ontology).
In my universe, there is an class:Aircraft (individual:myA320) which has exactly 1 class:FlightPlan (ind:FlightPlan) This class:FlightPlan has some class:waypoint attached ind:{W2,W3,W4}

In my head, it sounds that if An Aircraft has a FlightPlan, it will have implicitly has waypoints as well I have checked it under the DL Query :
> Aircraft and (hasWaypoint value W1)
I'm expecting : myA320
It returns : Nothing.


Could someone explain me where I'm wrong, please ?
Thank you for your time,


PS: I'm trying to use the "Punning" process : "Treating classes as instances of metaclasses (Class ↔ Individual)". It moight be the cause of the issue.


File attached: AircraftMission_Sample.owl



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
Hi marksem,

Thank you for your time.

I have had an issue while uploading the owl.
Take another look on the first message or here: MissionAircraft_Sample.owl
<http://protege-project.136.n4.nabble.com/file/t377085/MissionAircraft_Sample.owl>  

Regards,

TL



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann
In reply to this post by tomekldc
starting from your individual:myA320, where do you see the

hasWaypoint W1

relation? There is no such information assigned to the individual, not to any of the classes the individual belongs to.

On 13.02.20 12:50, tomekldc wrote:

> Hi,
>
> I have a minor issue getting the inference I'm expecting.
> I have an ontology specialized in the field of the aeronautics (here
> attached, a sub-ontology).
> In my universe, there is an class:Aircraft (individual:myA320) which has
> exactly 1 class:FlightPlan (ind:FlightPlan)
> This class:FlightPlan has some class:waypoint attached ind:{W2,W3,W4}
>
> In my head, it sounds that if An Aircraft has a FlightPlan, it will have
> implicitly has waypoints as well
> I have checked it under the DL Query :
>> Aircraft and (hasWaypoint value W1)
> I'm expecting : myA320
> It returns : Nothing.
>
>
> Could someone explain me where I'm wrong, please ?
> Thank you for your time,
>
>
> PS: I'm trying to use the "Punning" process : "Treating classes as instances
> of metaclasses (Class ↔ Individual)". It moight be the cause of the issue.
>
>
> File attached: AircraftMission_Sample.owl
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
This post was updated on .
Hi Lorenz Buehmann,

Those are the facts that I would to reasonner to infer.
Since myA320 has a FlightPlan and this FlightPlan has some waypoints {W2,W3
and W4}, I would expect that myA320 has those waypoints {W2,W3 and W4}(not
the W1, my bad).

Isn't it ?

I'm not looking for explicit knowledge.



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
protege-user@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann

On 13.02.20 13:32, tomekldc wrote:
> Hi Lorenz Buehmann,
>
> That's the facts that I would to reasonner to infer.
> Since myA320 has a FlightPlan and this FlightPlan has some waypoints {W2,W3
> and W4}, I would expect that myA320 has those waypoints {W2,W3 and W4}(not
> the W1, my bad).

Not, really. the axioms are

myA320 hasForFlightPlan FlightPlan
Flightplan hasWaypoint W2
Flightplan hasWaypoint W3
Flightplan hasWaypoint W4

But that does not mean myA320 "has" those waypoints. Or let me ask, what means "has"? I mean, what is in your opinion the property between?

 
myA320   ???    W2
myA320   ???    W3
myA320   ???    W4

Thin of it as a graph, it's 2 hops between, thus, you need two properties or some axiom that infers a property

The current query you need is

Aircraft and (hasForFlightPlan some( hasWaypoint value W2))

>
> Isn't it ?
>
> I'm not looking for explicit knowledge.
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann
if you add the axiom

hasForFlightPlan o hasWaypoint subPropertyOf hasWaypoint


then your query would work.

On 13.02.20 13:44, Lorenz Buehmann wrote:

> On 13.02.20 13:32, tomekldc wrote:
>> Hi Lorenz Buehmann,
>>
>> That's the facts that I would to reasonner to infer.
>> Since myA320 has a FlightPlan and this FlightPlan has some waypoints {W2,W3
>> and W4}, I would expect that myA320 has those waypoints {W2,W3 and W4}(not
>> the W1, my bad).
> Not, really. the axioms are
>
> myA320 hasForFlightPlan FlightPlan
> Flightplan hasWaypoint W2
> Flightplan hasWaypoint W3
> Flightplan hasWaypoint W4
>
> But that does not mean myA320 "has" those waypoints. Or let me ask, what means "has"? I mean, what is in your opinion the property between?
>
>  
> myA320   ???    W2
> myA320   ???    W3
> myA320   ???    W4
>
> Thin of it as a graph, it's 2 hops between, thus, you need two properties or some axiom that infers a property
>
> The current query you need is
>
> Aircraft and (hasForFlightPlan some( hasWaypoint value W2))
>
>> Isn't it ?
>>
>> I'm not looking for explicit knowledge.
>>
>>
>>
>> --
>> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
>> _______________________________________________
>> protege-user mailing list
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/protege-user
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
Passing the objectProperty "hasForFlightPlan" as a subProperty of
"hasWaypoint" worked.

Thank you Lorenz Buehmann.



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
I have another question about the topic.

Is there a way to get all the waypoints of the flightplan associated to an
aircraft attached to the main instances / class : myA320, after I start the
reasoner ?

ind:myA320
-- hasWaypoint: ind:W2
-- hasWaypoint: ind:W3
-- hasWaypoint: ind:W4







--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
In reply to this post by Lorenz Buehmann
I have another question about the topic.

Is there a way to get all the waypoints of the flight plan associated to an
aircraft attached to the main instances / class : myA320, after I start the
reasoner ?
> All the indirect data properties attached to the individual:

ind:myA320
-- hasWaypoint: ind:W2
-- hasWaypoint: ind:W3
-- hasWaypoint: ind:W4
-- ...




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann
In reply to this post by tomekldc
that sounds wrong semantically ... why did you not use the property
chain axiom I suggested?

hasForFlightPlan o hasWaypoint subPropertyOf hasWaypoint




On 13.02.20 14:32, tomekldc wrote:

> Passing the objectProperty "hasForFlightPlan" as a subProperty of
> "hasWaypoint" worked.
>
> Thank you Lorenz Buehmann.
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann
In reply to this post by tomekldc
what do you mean by "get"? Querying? If so


1) You can use Snap SPARQL plugin and write a SPARQL query:

select * {
   <MY_URI_FOR:myA320> <MY_URI_FOR:hasWaypoint> ?wp
}

(don't forget to use the correct URIs here insead of my dummy ones)


2) use DL Query and write some fancy stuff like

         inverse(hasWaypoint) some {myA320}

and query of instances in the DL Query tab


On 17.02.20 08:27, tomekldc wrote:

> I have another question about the topic.
>
> Is there a way to get all the waypoints of the flight plan associated to an
> aircraft attached to the main instances / class : myA320, after I start the
> reasoner ?
>> All the indirect data properties attached to the individual:
> ind:myA320
> -- hasWaypoint: ind:W2
> -- hasWaypoint: ind:W3
> -- hasWaypoint: ind:W4
> -- ...
>
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
Hi Lorenz Buehmann,

Thank you for you reply.
I did use your property chain axiom you suggested and it worked.

However I'm wondering if my individual#myA320 could have attached directly
(under the individual) all the waypoints inferred through the Flightplan
(see the image : aircraftExample.png)
<http://protege-project.136.n4.nabble.com/file/t377085/aircraftExample.png>

What I am asking might not be possible.

Best regards,



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann
I do not understand. That is exactly what this axiom is doing. It infers
the 3 waypoints to individual myA320.

What is not working, I don't really get it. And what means "under the
individual"?


By the way, the directions in your image are wrong, all the arrows
should go to the other directions.

On 17.02.20 10:53, tomekldc wrote:

> Hi Lorenz Buehmann,
>
> Thank you for you reply.
> I did use your property chain axiom you suggested and it worked.
>
> However I'm wondering if my individual#myA320 could have attached directly
> (under the individual) all the waypoints inferred through the Flightplan
> (see the image : aircraftExample.png)
> <http://protege-project.136.n4.nabble.com/file/t377085/aircraftExample.png>
>
> What I am asking might not be possible.
>
> Best regards,
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
Hi,

I am very sorry for this misunderstanding.
I will do my best to make myself more understandable.

As a human, if we say that "an Aircraft,  has a FlightPlan" and this
"FlghtPlan has waypoints attached to it", then it means, that this
particular aircraft has some waypoints to pass by, right?
Implicitly, it means, that if I go check all the properties of this
aircraft, I should see all the waypoints (that are inferred) attached to it.

What I would like to see in Protégé, is that when I hit the reasoner, the
ind:aircraft should get all the data properties "hasWaypoint" +
ind:{W1,W2,W4}.
<http://protege-project.136.n4.nabble.com/file/t377085/ind_myA320_inf.png>

What do you think ?

Best regards,





PS: Thank you for your comment on my diagram, I fixed it.



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

Lorenz Buehmann

Sorry, but I still don't get it. It **does** infer those axioms. You have to add the axiom I suggested and start the reasoner:



On 17.02.20 11:49, tomekldc wrote:
Hi,

I am very sorry for this misunderstanding.
I will do my best to make myself more understandable.

As a human, if we say that "an Aircraft,  has a FlightPlan" and this
"FlghtPlan has waypoints attached to it", then it means, that this
particular aircraft has some waypoints to pass by, right?
Implicitly, it means, that if I go check all the properties of this
aircraft, I should see all the waypoints (that are inferred) attached to it.

What I would like to see in Protégé, is that when I hit the reasoner, the
ind:aircraft should get all the data properties "hasWaypoint" +
ind:{W1,W2,W4}.
<http://protege-project.136.n4.nabble.com/file/t377085/ind_myA320_inf.png> 

What do you think ?

Best regards,





PS: Thank you for your comment on my diagram, I fixed it.



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic Inference problem

tomekldc
I saw why you couldn't understand my problem as for you, there is no problem.
Through your picture, I saw that you have it as I expected it.

I checked again and I had an issue with my chain axiom.

Now, everything *works like a charm*.

Thank you a lot for your patience Lorenz Buehmann,

Best regards,



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user