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
0
votes
0 answers

How to infer a property depending on a comparison between two (transitive) properties on two individuals?

I am modeling an ontology that shall be used to decide whether a person (a legal subject) is legally capable of accepting a contract. To do so, I model the contract itself, the jurisdiction it is under, the age of full legal capacity in a…
Dominik George
  • 516
  • 2
  • 15
0
votes
0 answers

swrl rule specify individual that is not part of class

I can't find a solution to this swrl rule. let's say I have a class named 'AmericanCity', and a class named 'CanadianCity', and I have a 3rd class named 'NotAmerican'.. how can I say that if an individual x doesn't belong to the AmericanCity class,…
Tef Don
  • 99
  • 8
0
votes
0 answers

several questions on OWL + SWRL : 1/checking if individual has data property 2/getting the "leaves" of a tree 3/summing all tree branches

I have several questions on OWL + SWRL. Please note that I am a newbie either on all the science behind logics and ontologies. And newbie on protégé as well. I am currently using Protégé 5.6.1. I have an ontology where I model assemblies composed of…
B.Bocquet
  • 21
  • 5
0
votes
0 answers

SWRL rules (or Jena rules) for reasoning on set

I am trying to write a SWRL rule that takes the facts : Robot:robot1 hasSkill RobotSkill:location. Robot:robot1 hasSkill RobotSkill:move. Robot:robot2 hasSkill RobotSkill:location. Robot:robot2 hasSkill RobotSkill:greeting. RobotTask:guide2visitor…
Alex
  • 21
  • 1
  • 7
0
votes
0 answers

Build a Java function that does the same job as makeOWLThing in SWRL

Here's my SWRL rule. It states that if an operation exists and has an action, it needs to create a new variable h of type Hold, that hold the same action value as the operation: Operation(?op) ^ hasAction(?op, ?action)^ makeOWLThing(?h,…
user93804
  • 83
  • 8
0
votes
0 answers

How to select individuals with one property value with SWRL rules using Protègè

I'm modelling an ontology about Pokèmon using Protègè 5.5.0 and it's reasoner Hermit (Pellet doesn't work and makes the program crash). I created some rules about pokemon types' effectiveness. I first created a rules stating that, for example, a…
AC24
  • 1
0
votes
0 answers

SWRL rule equivalent for IN condition (sql)

I want to add a SWRL rule basis some list of object property values or data property values. Person(?p)^hasPosition(?p,[CEO,COO,CFO,MD]) -> hasWorkGroup(?p,ExecutiveManagement) How do I correctly define [CEO,COO,CFO,MD] as list of values as we do in…
Dave
  • 1
  • 2
0
votes
0 answers

SWRL Rules with data property values and range

I am writing a SWRL rule in OWL which can infer if a person is of driving age or not. Person(?p), xsd:int[>= "18"^^xsd:int <= "65"^^xsd:int](?age), hasAge(?p, ?age) -> isDriverAge(?p, "True"xsd:Boolean) It gives me Unexpected Character '[' error I…
Dave
  • 1
  • 2
0
votes
0 answers

how to select a string value of data properties in protege?

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…
giangri_93
  • 29
  • 3
0
votes
0 answers

How can I use ontologies and SWRL in a recommendation application?

I'm working on a new project for recommendations to illustrate the importance of the semantic web. So, I decided to use ontologies and SWRL rules. But I have questions, does the ontology replace the role of the database (i.e. should I use only…
0
votes
0 answers

How to "forward" an object property from a pair of individuals to another?

Supposing I have: some individuals a1 and a2 from class A, b1 and b2 from class B an object property "myProperty" from A to A or B to B. an object property "otherProperty" from A to B a1 :myProperty a2 a1 :otherProperty b1 and a2 :otherProperty…
0
votes
1 answer

Can I send turtle language to Apache Jena Fuseki?

I am currently fetching and creating rules in Apache Jena Fuseki for a project. The things is that for the moment I am only able to get and post information via SPARQL which is great for fetching triplets, but very complicated to write and to read…
0
votes
1 answer

SWRL Rules in Protege 5.5.0

I have 2 Classes(Agent and Penalty). Also, I have hasPoint(Penalty) and hasWeight(Agent) data properties. When I write this SWRL Rule, I got an error: Agent(?a) ^ hasWeight(?a,?x) ^ Penalty(?p) ^ hasPoint(?p,?y) ^ swrlb:add(?z,?x,?y) ->…
0
votes
0 answers

Stardog raises ConcurrentModificationException upon reasoned query on graph with SWRL Rules

When trying to execute a query with reasoning in a model, I get this error: 000012: com.complexible.stardog.plan.eval.operator.OperatorException: Uncaught error during query evaluation: ConcurrentModificationException Ontology model has 2 SWRL rules…
0
votes
0 answers

SWRL rule in Protégé 4.3

I want to create a new class "Adult" to my ontology by using a SWRL rule, i used this rule: Person(?p), age(?p, true), greaterThan(age, 18) -> Adult(?p) I also installed pellet reasoner to execute this rule but the class is not created after…
user4374239
  • 93
  • 2
  • 11