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

SWRLTab usage in Protege

Everyone, I'm used to Protégé but now, I'm trying to use SWRLTab, a Protégé plugin. The problem is that I'm really not familiar with the SWRL rule-syntax. Let's have fun with my problem : I've an well-known ontology, called "pizza". Let's say I've…
Clement B
  • 218
  • 1
  • 4
  • 14
1
vote
0 answers

Run sequences of multiple SWRL rules in protege

I have several SWRL rules that use the result of each other. Currently, I can run the rules one by one through the SWRL/SQWRL tabs. Is there a way to run these rules in succession in such a way that I do not have to run them one by one?
alex
  • 7,551
  • 13
  • 48
  • 80
1
vote
1 answer

Protege fuzzyOWL2 plugin fuzzy query

I'm learning fuzzy ontology . There are several different ways like F-swrl , owl2 fuzzy plugin, fsparql. But it seems owl2 fuzzy plugin to be the most famous plugin for fuzzifying. Some researchers have only used SWRL and others used a combination…
alex
  • 7,551
  • 13
  • 48
  • 80
1
vote
0 answers

Infer subClassOf with a SWRL rule

I would like to write the following rule in SWRL: Each instance of A is a subclass of B This is what I entered as a SWRL rule in Protege: A(?x1) -> subClassOf(?x1, B) Error: Invalid OWL individual name 'B'
Nix
  • 176
  • 1
  • 10
1
vote
1 answer

OWL-XML serialization of SWRL rules with OWLAPI

Where is the OWL-XML serialization format specified which is used by the OWLAPI to serialize SWRL rules? E.g. by serializing a simple rule using Protege (which uses the OWLAPI as far as I know) I get the following code: ... …
user3579222
  • 1,103
  • 11
  • 28
1
vote
0 answers

Reclassifying instances asserted using SWRLJessTab Protege

I am using Protege 3.4 and I built my ontology and extended it with SWRL rules using SWRL and sqwrl built ins . The rules classifies instances of a class of the ontology ; the RHS is class assertion of an instance .It works successfully but when I…
1
vote
1 answer

recursion : from Prolog to SWRL

Do you know how to translate recursion in SWRL. For example, this type of Prolog rules : (an ancestor is a parent or an ancestor of a parent. ancestor(X,Y):- parent (X,Y). ancestor(X,Y):- parent(X,Z), ancestor(Z,Y).
Hana
  • 101
  • 10
1
vote
2 answers

How to write OR operation in sqwrl query

For AND operation in sqwrl query, it is like : Symptom(fever) ^ Symptom(vomiting) ^ Disease(?y) ^ hasSymptom(?y,fever) ^ hasSymptom(?y,vomiting) -> sqwrl:select(?y) From the above rule, it is selecting the diseases that have both symptoms. What…
Muzogeek
  • 53
  • 7
1
vote
1 answer

What's the use cases of rule engines in Protege?

When writing new rules in Protege with SWRLTab and SQWRLTab, we define constrained rules in SWRL and query with SQWRL by using semantic reasoners such as FaCT++, Pellet, ..., or rule engines such as Drools or Jess. But because Protege limits its…
c2416726
  • 69
  • 4
1
vote
1 answer

SWRLb - greaterThan and lessThan triggered

I have a problem using SWRL rules. I have a robot that should notify a human in case of two abnormal situations. For my test case I use the tension of a user: if the tension is less than 14, then the robot alert that the tension is…
1
vote
2 answers

swrlx:makeOWLThing is creating only one individual

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…
Median Hilal
  • 1,483
  • 9
  • 17
1
vote
0 answers

How can I make Blazegraph and SWRL work together?

I have written an SWRL rule in an ontology I've written. Specifically, the rule is: hasSampleLocale(?i, tag_retail) -> hasSampleLocale(?i, tag_domestic) This works just fine and dandy when I test it in Protege with the Hermit reasoner, but alas it…
sam_peels
  • 71
  • 1
  • 4
1
vote
1 answer

SPARQL QUERY in Protege 4.3

I have three class in my ontology class babyAge (6+, 8+, 12+) class taste (asam, manis, asin) class food (recipe name) i want to querying data food for babyAge (6+) and have taste (asam) i use this code in my java program (i dont know if there are…
1
vote
1 answer

SWRL and current date time

I am trying to use the swrl tab used with protege, and I was wondering if there is any way I can assert the current time and date in a rule. Also I need to know if I can subtract 2 dataproperties (type: dateTime). Thank-you in advance
1
vote
1 answer

SWRL - Rules depending on other rules assertions

Currently I'm developing an ontology to represent preferences that a specific user may have about something. For example, the user may have an MediaVolumeLevel preference set to VolumeLevel_3. The different levels (individuals of the class…