I create the book shop ontology and I need to infer a new triple with an SWRL rule.

Pseudocode:

if (order hasShipment 1day) and( order contain book) then order has shipmentPrice=230.

I created a SWRL rule with this syntax below:

@prefix pre: <http://www.semanticweb.org/ontologies/bookShop.owl#>.
@prefix ns: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@include <RDFS>. 
[rule: (?s pre:hasShipment ?o) (?s pre:contain ?b) (?b ns:type pre:Books) -> (?s pre:shipmentPrice 230)]

My SPARQL result does not reflect the triple (?s pre:shipmentPrice 230).

asked 26 Jan '13, 11:08

Ton%20Rawat's gravatar image

Ton Rawat
263
accept rate: 50%

edited 28 Jan '13, 17:26

Signified's gravatar image

Signified ♦
23.9k1623

1

@Ton, welcome to answers.semanticweb.com! Please have a look at the following:

http://answers.semanticweb.com/questions/14494/welcome-to-answerssemanticwebcom

As it stands, your question is missing some important details (a minimal example). What is your input data? What is your query? What tools are you using to execute the SWRL and SPARQL queries? How are they configured?

(28 Jan '13, 17:25) Signified ♦ Signified's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×44

question asked: 26 Jan '13, 11:08

question was seen: 590 times

last updated: 28 Jan '13, 17:26