Questions tagged [swrl]

SWRL (Semantic Web Rule Language) is a proposed semantic rule language based on combination of OWL-DL with Rule-ML.

SWRL is the Semantic Web Rule Language, formulated as a combination of OWL and RuleML. SWRL extends the definition of OWL axioms with Horn-like rules, thereby allowing additional inference capabilities, basic mathematical functionality and provide a formal meaning in an ontology. It was submitted to the W3C on 21 May 2004.

Rules take the form of logical implication with a rule antecedent(body) and rule consequent(head), each of which is composed of zero or more "atoms". These rules are read as "If the antecedent holds true then perform the actions in the consequent".

Rules can be expressed in a high level abstract syntax to express the Horn-like rules in OWL-Lite or OWL-DL or in the form of XML based syntax. The XML syntax based on RuleML and the OWL XML Presentation Syntax as well as an RDF concrete syntax based on the OWL RDF/XML exchange syntax.

The Official SWRL reference :
SWRL: A Semantic Web Rule Language Combining OWL and RuleML

Tools to write SWRL rules:
1)
2) Any text editor

Additional References:
1)
2)RuleML

173 questions
2
votes
2 answers

SWRL rules don't infer new Object and Data Property Assertions

I have created this ontology which contains two classes: Blood-Sugar and Services. Blood-Sugar has two data properties: hasValu with range xsd:int, and hasStatut with range xsd:string. The object property triggerService has Blood-Sugar as domain and…
Anima
  • 75
  • 2
  • 7
2
votes
1 answer

swrl rules to infer dataProperty values

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…
2
votes
1 answer

Checking logical implication relationships between OWL expressions?

I have a simple question which I suspect has no simple answer. Essentially, I want to check whether it is true that one OWL expression (#B) follows on logically from another (#A) - in other words I want to ask: is it true that #A -> #B? The reason…
1
vote
1 answer

"Ignoring transitivity and/or complex subproperty axioms"

I'm trying to obtain to model a property that is transitive, asymmetric and irreflexive. I understand that OWL reasoning does not support for this complex relationship. However, is there a way to "trick" the reasoner? I want to use this for…
1
vote
0 answers

Infer object property using sqwrl set operations in protege

I'm new to protege and ontologies. I wrote this rule in SQWRL tab in protege, to figure out if p is managed by r: metadata(?md1) ^ hasValue(?md1, ?val) ^ hasLabel(?md1, ?lbl) ^ replicaset(?r) ^ hasMatchlabels(?r, ?md1) . sqwrl:makeSet(?sr, ?md1)…
RabbitG
  • 103
  • 1
  • 8
1
vote
0 answers

How can I get number of property with SWRL rule in Protege

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…
tune fan
  • 11
  • 1
1
vote
0 answers

How can I express "there exist" in SWRL using protégé?

I want to express in SWRL the follwing rule : IF wasCommunicatedBy(a2,a1) THEN there exist e such that wasGeneratedBy(e,a1) and used(a2,e) which means communication between activities a1 and a2 implies the existence of an entity e generated by one…
user93804
  • 83
  • 8
1
vote
3 answers

How to determine if one range contains another?

Consider the following example: :rangeA :lowerLimit :LeftMarginA ; :upperLimit :RightMarginA . :rangeB :lowerLimit :LeftMarginB ; :upperLimit :RightMarginB . :LeftMarginA :hasValue 20 ; :RightMarginA :hasValue 80 . :LeftMarginB…
joylix
  • 95
  • 7
1
vote
0 answers

How can I use differentFrom and sameAs in owlready2?

In Prótege software is able to insert the differentFrom and sameAs in SWRL Rules, but when I code these properties in Python with owlready2 imported I came across with below message: semantic | File…
1
vote
0 answers

Classify individuals according to their object properties with certain rules in Protege

I have an example ontology in Protege 5.5 (I added it below). With this ontology I need to classify individuals according to their object properties. My rules are like these; if an individual A (subClassOf: A) has exact 1 object property…
Kadir M.
  • 11
  • 2
1
vote
0 answers

How to define rule for sum data values in Protege?

If I want to sum the cases of European countries in individual Europe is it possible to make it with SWRL rule in Protege
Seb
  • 85
  • 9
1
vote
1 answer

Does Marklogic Triple store support SWRL in Ontology?

I would like to understand that if I load an ontology with SWRL rules in it does Marklogic understand it right away or do we need to activate something to be able to get inferred knowledge (SPARQL) according to the rule?
user3663894
  • 115
  • 1
  • 1
  • 9
1
vote
0 answers

Is OWL2 + SWRL math built ins decidable?

I know that reasoning doesn't work in general when combining SWRL and OWL2 because the combination is not decidable. However, it is decidable when only certain things/rules are used. So assuming I only want to use the SWRL math built-ins, is…
quarky
  • 333
  • 1
  • 2
  • 12
1
vote
1 answer

OWL2, SWRL: Query if item is in range of another item?

My problem is that if i want to check if an instance is in range, i use the following rule: Rule1: Error(?d), TimeRelatedError(?c), TimeRelatedError_start_at(?c, ?s), error_at(?d, ?b), greaterThan(?b, ?s) -> is_after_TimeRelatedError_start(?d,…
lkaupp
  • 551
  • 1
  • 6
  • 17
1
vote
0 answers

How to input SWRL-rule with negation in SWRLtab in Protege 5?

Here I have found that it should be possible to write a SWRL-rule like this: Person(?p) ^ (hasCar = 0)(?p) -> CarlessPerson(?p) But when I have tried to input this example in SWRLtab in Protege I got an error: Unexpected character '=' I tried to…
Irina
  • 11
  • 2
1 2
3
11 12