0

I am trying to use the built-ins of SWRL in Protege 5.2 but they seem to not function. All my other rules (written without any built-in) are inferred and clearly visible when i start my reasoner (pellet). I am not sure, whether or not i need to setup something within protege or any other way to use the built-in's. Even a simple example as follows is not working:

Person(?x) ^ hasAge(?x,?age)^ swrlb:greaterThan(?age, 17) -> Adult(?x)  

I would appreciate any help. Thanks.

zero323
  • 322,348
  • 103
  • 959
  • 935
Amir
  • 1
  • Pellet supports almost all built-ins, thus, it should work as long as 1) there is data that matches the premise of the rule and 2) the datatype of age is an integer. Not sure, but you try to explicitly add the datatype `"17"^^xsd:integer` (or `xsd:int`, whatever you have as datatype for age) to the rule – UninformedUser Apr 08 '18 at 08:08

2 Answers2

0

Some of the reasoners don't have support for built-in types even though they support SWRL. Depending on the reasoner you may see a red triangle in the upper right-hand corner of Protege. Clicking on that will detail the error experienced.

Unfortunately I do not know of a reasoner which has support for built-in types for SWRL.

In this case there is a work-around. You can specify:

Class: Adult  
    hasAge some xsd:int[> "17"^^xsd:int]
Henriette Harmse
  • 4,167
  • 1
  • 13
  • 22
0

If you're using Hermit reasoner, know that it does not support built-in types for SWRL but Pellet Reasoner does. You can install it as a plugin and then, after restarting your application, set Pellet as the reasoner before starting it.

More information here : OWL2 and SWRL Tutorial