SWRL negation

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

SWRL negation

taha
Hello,

I have an ontology of university, i have Student class and courses class,
and have `studies` relation between Student and Courses, then i have
categorize student majors into some subclasses according to his courses, so
i wrote some rules to do that

Rule: Student(?stu) ^ Cs_courses(?cs_course) ^ unti:studies(?stu,
?cs_course) -> Computer_Science(?stu)

what i mean, if a student studies any course from cs_courses then he is
student of Computer Science major,  but what if a student studies two
courses from different majors, such as Mechtronics, student must has one
major, cs or mechatronics but cannot be two majors at the same.

I searched for this, so i think if there is a way to do negation in SWRL it
might help, but i found that negation isn't supported in SWRL.

ontology attached.
university.owl
<http://protege-project.136.n4.nabble.com/file/t377133/university.owl>  

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

Igor Toujilov-2
Hi,
For your use case you do not need SWRL. You just can use a general class axiom, for example:

(studies some computer_science_course) and (studies only computer_science_course)  SubClassOf only_computer_science_student

Please forgive me, I have some criticism about your ontology entity naming. So, I used my naming preferences.

You said: “... negation isn't supported in SWRL”.

There is a negation and a negation in SWRL: the negation as a failure is not supported, but class complements are supported. When we say that SWRL does not support negation as a failure, we mean negation of atom satisfiability. For example, not(C(?i)) is not supported, because if the individual does not exist, it cannot be bound to the variable. However, (not C)(?i) is supported.

Regards,
Igor


> Sent: Monday, September 23, 2019 at 11:31 AM
> From: "taha" <[hidden email]>
> To: [hidden email]
> Subject: [protege-user] SWRL negation
>
> Hello,
>
> I have an ontology of university, i have Student class and courses class,
> and have `studies` relation between Student and Courses, then i have
> categorize student majors into some subclasses according to his courses, so
> i wrote some rules to do that
>
> Rule: Student(?stu) ^ Cs_courses(?cs_course) ^ unti:studies(?stu,
> ?cs_course) -> Computer_Science(?stu)
>
> what i mean, if a student studies any course from cs_courses then he is
> student of Computer Science major,  but what if a student studies two
> courses from different majors, such as Mechtronics, student must has one
> major, cs or mechatronics but cannot be two majors at the same.
>
> I searched for this, so i think if there is a way to do negation in SWRL it
> might help, but i found that negation isn't supported in SWRL.
>
> ontology attached.
> university.owl
> <http://protege-project.136.n4.nabble.com/file/t377133/university.owl>  
>
> 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: SWRL negation

Lorenz Buehmann

On 24.09.19 00:27, Igor Toujilov wrote:
> Hi,
> For your use case you do not need SWRL. You just can use a general class axiom, for example:
>
> (studies some computer_science_course) and (studies only computer_science_course)  SubClassOf only_computer_science_student
you still would have to work around the Open World Assumption
>
> Please forgive me, I have some criticism about your ontology entity naming. So, I used my naming preferences.
>
> You said: “... negation isn't supported in SWRL”.
>
> There is a negation and a negation in SWRL: the negation as a failure is not supported, but class complements are supported. When we say that SWRL does not support negation as a failure, we mean negation of atom satisfiability. For example, not(C(?i)) is not supported, because if the individual does not exist, it cannot be bound to the variable. However, (not C)(?i) is supported.
same here, (not C)(i) would still have to follow "somehow" from the
ontology. Usually, most users asking for negation are asking for
negation as failure resp. some kind of closed world assumption like
thing where absence of information means it's negation.

>
> Regards,
> Igor
>
>
>> Sent: Monday, September 23, 2019 at 11:31 AM
>> From: "taha" <[hidden email]>
>> To: [hidden email]
>> Subject: [protege-user] SWRL negation
>>
>> Hello,
>>
>> I have an ontology of university, i have Student class and courses class,
>> and have `studies` relation between Student and Courses, then i have
>> categorize student majors into some subclasses according to his courses, so
>> i wrote some rules to do that
>>
>> Rule: Student(?stu) ^ Cs_courses(?cs_course) ^ unti:studies(?stu,
>> ?cs_course) -> Computer_Science(?stu)
>>
>> what i mean, if a student studies any course from cs_courses then he is
>> student of Computer Science major,  but what if a student studies two
>> courses from different majors, such as Mechtronics, student must has one
>> major, cs or mechatronics but cannot be two majors at the same.
>>
>> I searched for this, so i think if there is a way to do negation in SWRL it
>> might help, but i found that negation isn't supported in SWRL.
>>
>> ontology attached.
>> university.owl
>> <http://protege-project.136.n4.nabble.com/file/t377133/university.owl>  
>>
>> 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