semantics - Protege SWRL rules -


i've been trying define rules in ontology infer if person has friends friends amongst each other friends, if 1 or more not friends each other ontology infer all, not friends.

my diagram

thank you

you need intended semantics straightened out little bit more.

from gather, want isfriendwith @ least symmetric, i.e. when isfriendwith(bob, alice) isfriendwith(alice, bob).

also, if want have friendsall have meaning, isfriendwith cannot transitive. capture natural meaning, friend of friend not friend.

to elaborate: if isfriendwith symmetric , transitive every friend of bob automatically friend of of bob's friends (because isfriendwith(bob, alice) implies isfriendwith(alice, bob). there on, isfriendwith(bob, carol) transitivity implies isfriendwith(alice, carol). if isfriendwith symmetric , transitive, clique automatically.

but stated, not, want.

as formulating in swrl, let's give try, shall we?

friendsall reflexive, i.e. let's assume his/her own friend. now, need recursive rule extends set while still fulfilling condition: "in set, everybody's friend".

to include bob's friends, need able quantify on isfriendwith , check if candidate friend of bob friend of all other friends of bob. since cannot nest quantifiers in swrl, i'm more or less sure, cannot express algorithm in rule language alone. however, maybe wrong here , there neat little trick hidden inside semantics. not 1 know of, , need quantifier nesting in direct formulation leaves me believing not possible.

it boils down well-known graph-theoretic problem: given starting point bob friendsall largest subset of bob's friends such every everbody in group friends else, i.e. bob's maximal clique.


Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -