Mathematical expression in SWRLTab and Pallet reasoner

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

Mathematical expression in SWRLTab and Pallet reasoner

mmmh
Hi,

I am writing a rule to infer similarity of two instances X and Y if they
have data property value Xvalue and Yvalue ratio (Xvalue/Yvalue) between
0.75 and 1.25. I wrote these rule in SWRLTab using swrlm:eval, but i am
using Pallet reasoner and there is no result of similarity of the two
instances.  To clarify these rule let us assume that we have a class of
Person and two instances (Persons) X and Y. These two persons have data
property named hasAge. Person X hasAge age Xyear and person Y hasAge Yyear.
Then, I write the rule as follows:

Person(?X) ^ Person(?Y) ^ hasAge(?X,?Xyear)^ hasAge(?Y,?Yyear) ^
swrlm:eval(?Percentage, "Xyear/ Yyear", ?Xyear, ?Yyear) ^
swrlb:greaterThan(?Percentage, 0.75) ^ swrlb:lessThan(?Percentage, 1.25)->
sameAs(?X, ?Y)
 
for example, if person X age is 40 and person Y age is 35 the Percentage
ration will be 40/35=1.15. The ration of 1.15 is between 0.75 and 1.25, then
and we should get person X is the same individual as person Y.

The questions:

Is these rule correct?
If so why I don't get the result using Pallet reasoner?
If it is not correct, How can we infer such thing?

Thanks in advance



--
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: Mathematical expression in SWRLTab and Pallet reasoner

Martin O'Connor-2

Only the core SWRL built-ins [1] are supported by Pellet. The swrlm:eval built-in is a custom built-in [2] provided by the SWRLAPI (one of several libraries that it provides [3]).

Martin


On May 24, 2018, at 1:27 PM, mmmh <[hidden email]> wrote:

Hi,

I am writing a rule to infer similarity of two instances X and Y if they
have data property value Xvalue and Yvalue ratio (Xvalue/Yvalue) between
0.75 and 1.25. I wrote these rule in SWRLTab using swrlm:eval, but i am
using Pallet reasoner and there is no result of similarity of the two
instances.  To clarify these rule let us assume that we have a class of
Person and two instances (Persons) X and Y. These two persons have data
property named hasAge. Person X hasAge age Xyear and person Y hasAge Yyear.
Then, I write the rule as follows:

Person(?X) ^ Person(?Y) ^ hasAge(?X,?Xyear)^ hasAge(?Y,?Yyear) ^
swrlm:eval(?Percentage, "Xyear/ Yyear", ?Xyear, ?Yyear) ^
swrlb:greaterThan(?Percentage, 0.75) ^ swrlb:lessThan(?Percentage, 1.25)->
sameAs(?X, ?Y)

for example, if person X age is 40 and person Y age is 35 the Percentage
ration will be 40/35=1.15. The ration of 1.15 is between 0.75 and 1.25, then
and we should get person X is the same individual as person Y.

The questions:

Is these rule correct?
If so why I don't get the result using Pallet reasoner?
If it is not correct, How can we infer such thing?

Thanks in advance



--
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: Mathematical expression in SWRLTab and Pallet reasoner

mmmh

Dear Martin

 

Is there any tutorial to install and get start with SWRLAPI into the ontology? I followed the instruction in [1] but it does not work. I did all the steps but I did not get SWRLAPI tap in the ontology.

 

[1] https://github.com/protegeproject/swrlapi

 

 

From: protege-user <[hidden email]> On Behalf Of Martin O'Connor
Sent: Friday, May 25, 2018 2:11 AM
To: User support for WebProtege and Protege Desktop <[hidden email]>
Subject: Re: [protege-user] Mathematical expression in SWRLTab and Pallet reasoner

 

 

Only the core SWRL built-ins [1] are supported by Pellet. The swrlm:eval built-in is a custom built-in [2] provided by the SWRLAPI (one of several libraries that it provides [3]).

 

Martin

 

 

On May 24, 2018, at 1:27 PM, mmmh <[hidden email]> wrote:

 

Hi,

I am writing a rule to infer similarity of two instances X and Y if they
have data property value Xvalue and Yvalue ratio (Xvalue/Yvalue) between
0.75 and 1.25. I wrote these rule in SWRLTab using swrlm:eval, but i am
using Pallet reasoner and there is no result of similarity of the two
instances.  To clarify these rule let us assume that we have a class of
Person and two instances (Persons) X and Y. These two persons have data
property named hasAge. Person X hasAge age Xyear and person Y hasAge Yyear.
Then, I write the rule as follows:

Person(?X) ^ Person(?Y) ^ hasAge(?X,?Xyear)^ hasAge(?Y,?Yyear) ^
swrlm:eval(?Percentage, "Xyear/ Yyear", ?Xyear, ?Yyear) ^
swrlb:greaterThan(?Percentage, 0.75) ^ swrlb:lessThan(?Percentage, 1.25)->
sameAs(?X, ?Y)

for example, if person X age is 40 and person Y age is 35 the Percentage
ration will be 40/35=1.15. The ration of 1.15 is between 0.75 and 1.25, then
and we should get person X is the same individual as person Y.

The questions:

Is these rule correct?
If so why I don't get the result using Pallet reasoner?
If it is not correct, How can we infer such thing?

Thanks in advance



--
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: Mathematical expression in SWRLTab and Pallet reasoner

Lorenz B.

did not get SWRLAPI tap in the ontology
what does this mean? The SWRL Tab is tab pre-installed in Protege (e.g. 5.2.0) - just open it and use it. just to cite the docs:

The plugin comes preinstalled with Protégé. The plugin can be updated to the latest version via the 'File -> Check for plugins...' menu item in Protégé. A popup will appear listing updatable plugins. The 'Protégé->About Protégé' menu uption can be used to display the current version of the plugin.

SWRLAPI is a Java API


On 26.05.2018 12:15, Mmabkhot wrote:

Dear Martin

 

Is there any tutorial to install and get start with SWRLAPI into the ontology? I followed the instruction in [1] but it does not work. I did all the steps but I did not get SWRLAPI tap in the ontology.

 

[1] https://github.com/protegeproject/swrlapi

 

 

From: protege-user [hidden email] On Behalf Of Martin O'Connor
Sent: Friday, May 25, 2018 2:11 AM
To: User support for WebProtege and Protege Desktop [hidden email]
Subject: Re: [protege-user] Mathematical expression in SWRLTab and Pallet reasoner

 

 

Only the core SWRL built-ins [1] are supported by Pellet. The swrlm:eval built-in is a custom built-in [2] provided by the SWRLAPI (one of several libraries that it provides [3]).

 

Martin

 

 

On May 24, 2018, at 1:27 PM, mmmh <[hidden email]> wrote:

 

Hi,

I am writing a rule to infer similarity of two instances X and Y if they
have data property value Xvalue and Yvalue ratio (Xvalue/Yvalue) between
0.75 and 1.25. I wrote these rule in SWRLTab using swrlm:eval, but i am
using Pallet reasoner and there is no result of similarity of the two
instances.  To clarify these rule let us assume that we have a class of
Person and two instances (Persons) X and Y. These two persons have data
property named hasAge. Person X hasAge age Xyear and person Y hasAge Yyear.
Then, I write the rule as follows:

Person(?X) ^ Person(?Y) ^ hasAge(?X,?Xyear)^ hasAge(?Y,?Yyear) ^
swrlm:eval(?Percentage, "Xyear/ Yyear", ?Xyear, ?Yyear) ^
swrlb:greaterThan(?Percentage, 0.75) ^ swrlb:lessThan(?Percentage, 1.25)->
sameAs(?X, ?Y)

for example, if person X age is 40 and person Y age is 35 the Percentage
ration will be 40/35=1.15. The ration of 1.15 is between 0.75 and 1.25, then
and we should get person X is the same individual as person Y.

The questions:

Is these rule correct?
If so why I don't get the result using Pallet reasoner?
If it is not correct, How can we infer such thing?

Thanks in advance



--
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