swrl

Protege Using swrl:equal to compare the values of datatype property

孤街醉人 提交于 2019-12-25 16:03:14
问题 I am building an ontology of 3 classes : Messages Ham Spam 2 dataproperties , domain : Messages and range xsd:string : hasInterest hasCategory 2 SWRL Rules: Message(?x),hasInterest(?x,?a),hasCategory(?x,?b), swrl:equal(?a,?b) ->Ham(?x) Message(?x),hasInterest(?x,?a),hasCategory(?x,?b), swrl:notEqual(?a?b) ->Spam(?x) I want to classify instances of class Message to class Spam or Ham ; if the hasCategory value ( message category) is equal to the hasInterest value ( user interests) then the

Protege Using swrl:equal to compare the values of datatype property

非 Y 不嫁゛ 提交于 2019-12-25 16:02:16
问题 I am building an ontology of 3 classes : Messages Ham Spam 2 dataproperties , domain : Messages and range xsd:string : hasInterest hasCategory 2 SWRL Rules: Message(?x),hasInterest(?x,?a),hasCategory(?x,?b), swrl:equal(?a,?b) ->Ham(?x) Message(?x),hasInterest(?x,?a),hasCategory(?x,?b), swrl:notEqual(?a?b) ->Spam(?x) I want to classify instances of class Message to class Spam or Ham ; if the hasCategory value ( message category) is equal to the hasInterest value ( user interests) then the

Creating New Classes and Individuals with SWRL in Protege

旧街凉风 提交于 2019-12-24 04:31:14
问题 I've been trying to write SWRL rules that automate creation of new entities and their assignment to classes and predicates in a Protege ontology. The code here didn't result in creation of even one individual, neither did the example in the readme work. For clarity, here is the rule I'm trying to make work: Person(?person) ^ hasSSN(?person, ?ssn) ^ swrlx:makeOWLThing(?patient, ?person) -> Patient(?patient) ^ hasPID(?patient, ?ssn) In this ontology: @prefix : <http://www.semanticweb.org

Creating New Classes and Individuals with SWRL in Protege

坚强是说给别人听的谎言 提交于 2019-12-24 04:31:07
问题 I've been trying to write SWRL rules that automate creation of new entities and their assignment to classes and predicates in a Protege ontology. The code here didn't result in creation of even one individual, neither did the example in the readme work. For clarity, here is the rule I'm trying to make work: Person(?person) ^ hasSSN(?person, ?ssn) ^ swrlx:makeOWLThing(?patient, ?person) -> Patient(?patient) ^ hasPID(?patient, ?ssn) In this ontology: @prefix : <http://www.semanticweb.org

SWRL : ^ not work on protege 4.3

為{幸葍}努か 提交于 2019-12-12 04:59:21
问题 I'm trying to add a SWRL rule to protege using conjuction sign ^ but Protege 4.3 does not approve that sign. This issue is also present for swrl buildins such as swrlb:lessThanOrEqual . What's wrong with ^ ? May I use , instead? 回答1: The terms in the Protege SWRL editor are separated by commas, not ^. See, for instance, the screenshots in my answer to SWRL rules in protege 3.4.8. whats wrong with ^ ? may i use , instead ? That the answer, yes. I'm not sure what prevented you from trying it in

swrlx:makeOWLThing is creating only one individual

风格不统一 提交于 2019-12-11 05:08:49
问题 Using Protege and SWRL tab, I have the ontology mentioned hereinafter. It is composed of the Class Test and the class Shadow , where Test has three individuals t1, t2, t3 . I was trying to define an SWRL rule that creates an individual of Shadow class for each existing individual of Test , the rule is Test(?x) ^ swrlx:makeOWLThing(?new, ?x) -> Shadow(?new) QUESTIONS: Only one individual of Shadow , named fred is created, instead of three (corresponding to t1, t2, t3 ). How to control the

SWRL tab in Protege 4

元气小坏坏 提交于 2019-12-09 04:18:39
问题 The protege SWRL tab is not available in Protege 4 versions, I have tried both protege 4.1 and protege 4.2. The axiome plugin mentioned to edit the SWRL rules in protege has been said to work only in protege 3 versions. Can anyone tell me plugins or procedure to include the plugin to edit SWRL rules in protege? 回答1: SWRL rules can be edited in Protégé 4, but not with a nice interface like in Protégé 3. If you go to menu Window -> Views -> Ontology views, there is an option Rules. Select it

swrl rules to infer dataProperty values

非 Y 不嫁゛ 提交于 2019-12-06 11:13:55
问题 I'm trying to test a simple SWRL rule. There are three Classes in my ontology: LivingPlace which has two sub-classes RuralArea and City. LivingPlace is the domain of the dataProperty hasHospital which has the range boolean. When I test the following rule with Pellet reasoner, the individual I created as a member of LivingPlace is also inferred as a member of RuralArea. LivingPlace(?lp), hasHospital(?lp, false) → RuralArea(?lp) However, what I really want to do is the reverse of this reasoning

Using SWRL with Jena and Pellet

寵の児 提交于 2019-12-06 08:35:07
问题 I was unable to find some decent simple code examples of using SWRL and Jena with Pellet, or at least using SWRL? I have studied some examples in Pellet documentation, but there is no example about using SWRL. Most examples on the web are incomplete and confusing. The only solution I found was with the Jess Rule Engine but it is not free and is under commercial license. I found that Pellet support SWRL rules but could not find running example. The only example I found is this, but I do not

swrl rules to infer dataProperty values

你。 提交于 2019-12-04 17:24:42
I'm trying to test a simple SWRL rule. There are three Classes in my ontology: LivingPlace which has two sub-classes RuralArea and City. LivingPlace is the domain of the dataProperty hasHospital which has the range boolean. When I test the following rule with Pellet reasoner, the individual I created as a member of LivingPlace is also inferred as a member of RuralArea. LivingPlace(?lp), hasHospital(?lp, false) → RuralArea(?lp) However, what I really want to do is the reverse of this reasoning. RuralArea(?lp) → hasHospital(?lp, false) Whenever I create an individual of type RuralArea, I want