owl - SWRL: restrict a rule to a specific individual -
lets there class "food" containing individuals "grain" , "fruit" . if want select grain can assign food_type
data property individuals
(class) food (ind_1) grain food_type ---> "grain_food" (ind_2) fruit food_type ---> "fruit_food"
and run code:
food(?x) ^ food_type(?x,"grain_food") -> sqwrl:select(?x)
but if want job (select grain
individual) without needing food_type
property? possible directly point specific individual name?
it's not clear you're asking, yes, can use individual in swrl rule. e.g., if have individual c class c, can do:
c(c) ⟶ sqwrl:select(c)
as long sqwrl:select doesn't require variable (i.e., long can accept individual directly), should fine. if requires variable, opposed individual directly (which go against intent, think), guess use kind of equality predicate, swrbl:equal:
swrlb:equal(c,?x) ⟶ sqwrl:select(?x)
Comments
Post a Comment