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
1 answer

How to classificate individuals in a class according to its cardinality

I have created this ontology which contains two classes Car, Person and the object property hasCar that has Person as domain and Car as range. I want to classify individuals(Persons) in multiCarOwner and OnlyCar person, here is the ontology that…
E.Luque
  • 3
  • 3
0
votes
0 answers

how to infere new datatype property

I have created a simple ontology and am trying to execute an SWRLrule (Please see the owl file). I use Pellet reasoner, but I didn't find the result of the inference. my rule is: Rule: Patient(?x), hasBloodSugar(?x, ?y), hasBloodSugarLevel(?y, 90)…
0
votes
1 answer

How to add variable number of values using swrl

This is my first post to stack overflow so I request for an encouraging reply :) (bonus reputations) I am trying to use SWRL to do some calculations for me. To imitate the problem, I have created a small ontology using protege 4.3. It has only two…
0
votes
1 answer

How to use swrl builtin in owlapi with pellet?

I try to use swrl in java owl-api with pellet. I have looked at : owl2 and swrl tutorial test of builtin swrl in pellet and swrl definition I manage to use swrl for simple inference like : A(?x) -> B(?x) But I'm stuck when it is need to use…
Galigator
  • 8,957
  • 2
  • 25
  • 39
0
votes
1 answer

Write in SWRL a mathematical expression to calculate probability distributions

I am new on Semantic Web Rules Language and I am writing some rules in order to calculate the probability of - discrete and continuous - distributions. I know that with SWRL I can do subtractions, addition, multiplication and divisions. But what…
KeyPi
  • 516
  • 5
  • 20
0
votes
2 answers

How to define SWRL rule name in Protege 4?

I utilized 'Rules' view in Protege 4 I think if protege support to define rule name. Rule: // syntax color is changed I defined rule like this 'context data'(?data), user(?user) -> hasData(?user, ?data) And I tried to define rule name.. but…
Dayamre
  • 1,907
  • 2
  • 13
  • 10
0
votes
1 answer

SWRL syntax in Protege

I am using Protege5.0, and i want to implement SWRL rule ie User(?u), isInActivity(?u, ?cm), ContextMeeting(?cm) -> FamilyContact(?f), hasStatus(?f, "Reject") which means "if user is in meeting then familycontact has status "reject". This syntax…
user2083529
  • 715
  • 3
  • 13
  • 25
0
votes
0 answers

deductive rule over properties without any resource in protege

friends i wrote an ontology that use same property that i named it " hasPart" for classes via properties restriction in necessary section of classes in protege."hasPart " property is without any resource for that i can reuse it . for example in…
shima
  • 11
  • 2
0
votes
1 answer

Java 8 is not supported in Protege 3.x and 4.x; Protege 5 supports Java 8 but we can not create rules

After upgrading to Java 8 I have come across an issue that my previous versions of Protege (i.e. 3.x and 4.x) do no support Java 8. I can continue with Protege 5, which supports Java 8, but there is a bug that prevents writing rules. The only…
Krishna Sapkota
  • 3,194
  • 2
  • 14
  • 10
0
votes
1 answer

How to work with SWRL in C# using OwlDotNetApi or other libraries

I need to import an OWL file that includes SWRL rules from Protégé and edit it in my own program which is written in C#. I used the OwlDotNetApi to import the file from Protégé, which worked fine. How can I work with the imported data? I have seen…
hshUser
  • 9
  • 1
0
votes
1 answer

SWRL rule to compare 2 string datatype property

I would like to ask you if we can creat an SWRL rule that permit to compare 2 datatype property of type string ? For instance, if we have have 2 classes : situation class that has has_situation_type as datatype property (srting), and service class…
Anima
  • 75
  • 2
  • 7
0
votes
1 answer

Make SWRL request using OWL API

I'm working with an OWL file generated using Protégé. I'm using the OWL API in my Java code. I have a set of defined classes, e.g.: SpeciesA ⊑ Species ⊓ ∃hasPart.Fruit ⊓ =hasShape.round SpeciesA is of subClass Species,…
0
votes
1 answer

equal instruction inside SWRL rule not working

I am using Protege 4.3 to make some SWRL rules. I have one class called "Person" with one property called "name". I created individuals from the class with different names, and some names are the same. I want to write a rule that creates instances…
riad
  • 361
  • 1
  • 9
  • 19
0
votes
1 answer

Disjunction inside SWRL rule

I am using Protege 4.3 to make some SWRL rules. Is it possible to write a rule that contains a disjunction in it For instance : Person(?x), Age(?x,?age), (?age < 10 or ?age > 30) -> blabla(?x) Meaning all people having age < 10 OR > 30
riad
  • 361
  • 1
  • 9
  • 19
0
votes
0 answers

Protege 4.2 and rule editor

I am working on protege 4.2 and using rule editor with pellet reasoner, trying to write rules on rule editor, but not able to understand how i can deduce some inference or execute them and find out some conclusion like my rule is if person is having…
1 2 3
11
12