1

I want to write a rule to get the number of assets owned by a network and check if it is greater than 3. So I wrote the SWRL rule as:

Network(?n)^(hasAsset\>3)(?n)-\>NetworkhasManyAssets(?n)

But the Protege says "Unexpected character \>"


How to modify the rule.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
tune fan
  • 11
  • 1
  • `hasAsset>3` that is not a valid SWRL syntax operator, see the SWRL specs and chose the proper comparison atom: https://www.w3.org/Submission/SWRL/#8.1 – UninformedUser Mar 24 '22 at 09:20
  • Yes, I also notice that, but could you tell me more detail about how to construct the right one. I check the link you posted. I found one possible rule like: Artist(?x) & (≤1 artistStyle)(?x) & creator(?z,?x) ⇒ (≤1 style/period)(?z) So I wrote the rule as: Network(?n)^(>3 hassAsset)(?n)->NetworkhasManyAssets(?n) It failed too. – tune fan Mar 27 '22 at 03:49

0 Answers0