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

swrlapi: Invalid SWRL atom predicate 'Person'

When running a SWRL rule I get in swrlapi Invalid SWRL atom predicate 'Person'. Most help suggests things like adding "Person" to the ontology. I think I've done that, but I want to be sure. My ontology is the turtle primer with a few…
jaxoncreed
  • 1,069
  • 2
  • 13
  • 24
0
votes
1 answer

How to Infer such "indirect" assertion with OWL or SWRL?

Knowledge lawn is wet today if it rained last night Fact we found lawn was wet this morning Infer it rained last night is this belong to SWRL? what should i read or check to easily understand these ?
crapthings
  • 2,485
  • 3
  • 20
  • 33
0
votes
0 answers

How to use 1 Object Property based on other ObjectProperty's assertion then make reasoning on individual in OWL

Classes Member Guest Object properties hasReferral (step 1) hasVote (step 2) hasApprove (step 3) Individuals A is a Member B is a Member C is a Guest A hasReferral C B hasVote C so infer A hasApprove C or If B hasVote C Then A hasReferral C,…
crapthings
  • 2,485
  • 3
  • 20
  • 33
0
votes
0 answers

In Pellet (Openllet) and Jena, how to change SWRL rules?

I have to run two sets of rules sequencely. Firstly, I run a set of rules, and get some results from the reasoning. Secondly, I want to run another set of rules based on the results from the first step. Can anyone tell me how to do so in JENA? Thank…
yangz
  • 53
  • 5
0
votes
1 answer

How to define DifferentIndividuals in SWRL rule in protege

I have a questioin about how to define two different idividuals in SWRQL. Here is an example. If B isSonOf A; If C isSonOf A; Then B and C are brothers. Here is the SWRL rule: isSunOf(?BB, ?AA) ^ isSunOf(?CC, ?AA) -> isBrotherOf(?BB, ?CC) I found in…
yangz
  • 53
  • 5
0
votes
0 answers

Insert mysql records into OWL ontology as individuals

I created an ontology using Protege and it saves as .OWL file in RDF/XML serialization. My ontology has two main Classes.. Category and Review. I have defined the object property called isAbout which connect the category individuals and review…
Eclayaz
  • 77
  • 1
  • 9
0
votes
2 answers

SWRL built-ins not working in Protege 5.2

I am trying to use the built-ins of SWRL in Protege 5.2 but they seem to not function. All my other rules (written without any built-in) are inferred and clearly visible when i start my reasoner (pellet). I am not sure, whether or not i need to…
Amir
  • 1
0
votes
0 answers

"swrlb:contains" built-in for named individuals

How to check whether a named individual of an ontology contains some particular string? For example consider the following rule: swrlb:contains(namedIndividual:mwf,"m")-> contains(namedIndividual:mwf,"m")
Sreekar
  • 43
  • 6
0
votes
0 answers

SWRL comparing a dateTime over time

I need to define a SWRL rule that checks whether the time of a xsd:dateTime datatype is between two specific times. How can i do that? I would need something that is compatible with Protégé. Thanks a lot.
Cilla
  • 419
  • 5
  • 16
0
votes
0 answers

SWRL divide by decimal

It seems SWRL divide function does not accept decimal . this is my query: universityproject:professor(?x) ^ universityproject:has_height(?x, ?h) ^ universityproject:has_weight(?x, ?w) ^ swrlb:pow(?phm, ?h, 2) ^ swrlb:divide(?res, ?w, ?phm) ^…
alex
  • 7,551
  • 13
  • 48
  • 80
0
votes
1 answer

Jess considers only the last mapped instance

I have a question in Jess Tab in Protege,I am building an ontology of 1 class Message and 3 instances :message 1 message2 message 3 , each each 3 datatype properties : category , interests , class .For each message I want to classify it as ham if…
0
votes
0 answers

SWRL for choosing the right value?

I'm trying to create an ontology of latin squares and make the reasoner solve it (starting with a simple 2x2 square and going from there) without much success. The major problem I'm having is writing a rule in a way that sees what values are…
0
votes
1 answer

how to call SWRL rules from netbeans and retrieve data in netbeans .

I really need your help regarding calling SWRL rules from netbeans and retrieve data in netbeans . I have servelet and jsp pages in my netbeans , i have owl-api as well. I have ontology in my protege and 2 simple SWRL rules in side protege as…
0
votes
1 answer

Protege Using swrl:equal to compare the values of datatype property

I am building an ontology of 3 classes : Messages Ham Spam 2 dataproperties , domain : Messages and range xsd:string : hasInterest hasCategory 2 SWRL Rules: Message(?x),hasInterest(?x,?a),hasCategory(?x,?b), swrl:equal(?a,?b)…
0
votes
0 answers

How to query within specific tags?

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…