SWRL rule

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

SWRL rule

Gokul
Can any one tell me how to write a SWRL rule for the below condition. I just
need a sample so that i can develop from my own

I have CLASS
1. agriculture
       (i) organic matter
             (a) calcium
             (b) magnesium
              (c) potassium
              (d) phosphrous
       (ii) species
           (a) maize
            (b) soybean
     
I have object growAt
I have data property (i)hascalcium (ii)hasmagnesium (iii)haspotassium
(iv)hasmagnesium

tell he how to write a swrl rule . just a sample



--
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: SWRL rule

sanju tiwari
Dear Gokul

There is a sample of SWRL rules

In IF-else form

if a person p
has_sibling s and s is a man
then
P and s are brothers.

Now in SWRL

Person (P) ^ hasSibling(S) ^ Man(S)--->  hasBrother(P,S)

I think now you can present your requirement into SWRL.

All the best.



On Sun, Jul 14, 2019 at 4:49 PM Gokul <[hidden email]> wrote:
Can any one tell me how to write a SWRL rule for the below condition. I just
need a sample so that i can develop from my own

I have CLASS
1. agriculture
       (i) organic matter
             (a) calcium
             (b) magnesium
              (c) potassium
              (d) phosphrous
       (ii) species
           (a) maize
            (b) soybean

I have object growAt
I have data property (i)hascalcium (ii)hasmagnesium (iii)haspotassium
(iv)hasmagnesium

tell he how to write a swrl rule . just a sample



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


--
Regards
Dr. Sanju Tiwari
Ontology Engineering Group
Departamento de Inteligencia Artificial
Escuela Técnica Superior de Ingenieros Informáticos
Universidad Politécnica de Madrid, Spain
Member IEEE
Member Machine Intelligence Research Labs(MIR Lab), USA




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

Re: SWRL rule

Gokul
same way i wrote this swrl rule

agr(?a) ^ hascalcium_mg(?a, ?hc) ^ calcium(?c) -> growAt(?a, ?hc)

i get a error as follows

Exception running SQWRL query S2: error running SQWRL queries: invalid query
name S2: invalid query name S2



--
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: SWRL rule

sanju tiwari
Not same
hascalcium_mg(?hc) use this

On Sun, Jul 14, 2019 at 5:08 PM Gokul <[hidden email]> wrote:
same way i wrote this swrl rule

agr(?a) ^ hascalcium_mg(?a, ?hc) ^ calcium(?c) -> growAt(?a, ?hc)

i get a error as follows

Exception running SQWRL query S2: error running SQWRL queries: invalid query
name S2: invalid query name S2



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


--
Regards
Dr. Sanju Tiwari
Ontology Engineering Group
Departamento de Inteligencia Artificial
Escuela Técnica Superior de Ingenieros Informáticos
Universidad Politécnica de Madrid, Spain
Member IEEE
Member Machine Intelligence Research Labs(MIR Lab), USA




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

Re: SWRL rule

Martin O'Connor-2
In reply to this post by Gokul

You are trying to use the SQWRL Tab instead of the SWRL Tab to execute SWRL rules


Documentation for SWRL and SQWRL can be found at the following links:


Martin


On Jul 14, 2019, at 8:08 AM, Gokul <[hidden email]> wrote:

same way i wrote this swrl rule

agr(?a) ^ hascalcium_mg(?a, ?hc) ^ calcium(?c) -> growAt(?a, ?hc)

i get a error as follows

Exception running SQWRL query S2: error running SQWRL queries: invalid query
name S2: invalid query name S2



--
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: SWRL rule

Lorenz Buehmann
In reply to this post by Gokul

?c is not used in any other atom of the rule, so what's he purpose of saying

calcium(?c)

it doesn't do anything.

And there is a difference between an SWRL  rule and an SQWRL query as Martin mentioned, so you also have to use the corresponding tab in Protege.

same way i wrote this swrl rule

agr(?a) ^ hascalcium_mg(?a, ?hc) ^ calcium(?c) -> growAt(?a, ?hc)

i get a error as follows

Exception running SQWRL query S2: error running SQWRL queries: invalid query
name S2: invalid query name S2



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

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user