0

Good evening everyone. I am working on an ontology about simpsons and I should define a rule that reads the value of a given properties and based on that places me users in a specific class. The class is called Student, and it must be populated through this rule : Rule: People(?p), occupation(?p, ?occupation), xsd:string"student" -> Student(?p).

I don't know why but protege gives me error, has anyone come across this type of error?

data properties data properties assertions

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
giangri_93
  • 29
  • 3
  • 1
    What/where is the error? – Stefan - brox IT-Solutions Sep 19 '22 at 15:16
  • 1
    You have the rule specified incorrectly. Assuming you have the classes `People` and `Student` with individual `john` and data property assertion `occupation "student"^^string` the rule `People(?p) ^ occupation(?p, ?o) ^ swrlb:stringEqualIgnoreCase(?o, "student") -> Student(?p)` will infer `john` is a `Student`. – Henriette Harmse Sep 20 '22 at 09:21
  • if i use that rule, protege not recognize swrlb:stringEqualIgnoreCase. I tried also to define a rule in "Class Expression Editor " this rule: People that occupation value "Student". But not work – giangri_93 Sep 21 '22 at 11:03
  • the rule in the Protege rule editor has to written as `People(?p), occupation(?p, ?o), stringEqualIgnoreCase(?o, "student") -> Student(?p)` – UninformedUser Sep 22 '22 at 06:12
  • In addition, you can also use an OWL axiom instead of the rule, i.e. you add a "General class axiom" in Protege with `People and occupation value "Student" SubClassOf: Student` - and yes, the only difference would be that the string has to be an exact match – UninformedUser Sep 22 '22 at 06:14

0 Answers0