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 use OWL API in netbeans connect it to proteje and SWRL to read a OWL file?

I could add OWL API in my netbeans library now i want to make connection with proteje and be able to read owl file in my local computer. do u have some source sample code related to it? thx
0
votes
0 answers

How to add SWRL vocabularies into Jena Framework

Hi I am an Ontology beginner, I have built an Ontology and saved the RDF file with rule enabled using Protege. I am going to build a web service that takes some inputs from the Ontology. The inputs can be provided by querying the arguments, class…
0
votes
1 answer

SWRLTab and JessTab in Protege 3.4.8

I am using Protege 3.4.8 and I want to execute some rules (using SWRL & Jess). I have create some rules for my ontology in protege but when I click the SWRLJess Tab button (Screenshot - Protege 3.4.8 SWRL tab.), nothing happens. Does anyone know if…
fay
  • 49
  • 1
  • 7
0
votes
1 answer

How to extend Pellet 2.4.0 with custom SWRL built-ins?

I've already accomplished this with the SWRLBuiltInBridge component of the SWRLAPI: https://github.com/protegeproject/swrlapi/wiki/SWRLBuiltInBridge However, in my Java code I also use the Pellet Reasoner with the OWLAPI. Whenever I use the reasoner…
0
votes
1 answer

How to select elements from UNION operation in sqwrl query

I am able to select the size of s3 and it is giving me the correct answer in rule 1. However, I want to select all the elements in s3. I tried Rule 2 but it is giving me the exception "error running SQWRL queries: error running Drools rule…
Muzogeek
  • 53
  • 7
0
votes
1 answer

else branch of a swrl rule

I want to ask if it is possible to express the else branch of a rule in SWRL? I know it can express p->q but i want to be able to assert r if non(p) example HeavyPrecipitation(?x) -> hasObservationTag(?x,FalsePositiveOutlier) and now i want to say…
Sorin
  • 105
  • 1
  • 10
0
votes
1 answer

Does SWRL support enumeration statement for individuals?

I'm doing some SWRL rules in OWL ontology like this: ..., hasHazardCode(?a, H350) -> DangerousProduct(?a) ..., hasHazardCode(?a, H350i) -> DangerousProduct(?a) ..., hasHazardCode(?a, H400) -> DangerousProduct(?a) ..., hasHazardCode(?a, H401) ->…
0
votes
0 answers

SWRL to owl axiom

I am new in OWL. I need to know how to convert the following rule in SWRL to OWL axioms. RULE: Taxon(?x), Taxon(?y), family(?y, "Myctophidae"), scientificName(?x, "Mirounga leonina") → is_predator_of(?x, ?y) Where: "Taxon" is a class, "family" and…
mdz
  • 1
0
votes
0 answers

How to define a class in an ontology with one special relation?

I want to define two classes whose members are nodes and they are the extent of several links. In the first class, one of these links have a type Highway, while in the second class none of them is a type Highway. I can make the first class using…
msc87
  • 943
  • 3
  • 17
  • 39
0
votes
1 answer

SWRL : ^ not work on protege 4.3

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?
alex
  • 7,551
  • 13
  • 48
  • 80
0
votes
1 answer

Protege inconsistent ontologies warning

Followed this intro youtube.com/playlist?list=PLea0WJq13cnAfCC0azrCyquCN_tPelJN1 to create the ontology. It is a little reduced http://prntscr.com/bo4l3w and I added canBeTutor (meaning somebody can become tutor for somebody) object property on my…
0
votes
0 answers

Result of semantic's query sqwrl:makeBag

I have an example about ontology with only class Person and a try to create a collection throw sqwrl:makeBag Person(?p) ˚ sqwrl:makeBag(?bag, ?p) ˚ sqwrl:size(?size, ?bag) -> sqwrl:select(?size) And I have 4 individuals with type Person but when I…
0
votes
1 answer

How to execute SWRL Rules in Protege 4.3?

I have created an ontology in Protege 4.3 along with a set of SWRL rules. In order to execute those rules and execute queries do I need another program to work with Protege or a plugin? Is a reasoner useful for this job? Searching I came across a…
Mandy
  • 21
  • 6
0
votes
1 answer

How to keep rule head as null using Protege swrl tab

I am trying to capture a conflict using SWRL rules. I learned that SWRL do support rules with empty head(consequent). But the Protege does not allow defining such rules. A dummy example of what I am trying to achieve…
0
votes
1 answer

SWRL - using knowledge from classes

I want to use knowledge, which is modelled between classes. E.g. I have modelled a car and a bus have 4 wheels, a bike 2 wheels. Now, I want to express that bike can tip (if you don't keep them in balance - incompetent driver). If I add an instance…
2Application
  • 165
  • 10