Hi Lorenz, I apologize for doing the same mistake as I did last time (forgetting to bound the variable). Actually, there is a slight difference between the syntax of SWRL rule and the Jena rule that is why I get confuse sometimes. Soon I will be used to it. :)
As always, you guys are amazing for helping us so immediately. I am really grateful to you for your help. It works perfectly fine now. Best regards, Izhar ________________________________________ From: Lorenz Buehmann [[email protected]] Sent: 31 July 2017 15:10 To: [email protected] Subject: Re: Generic Rule Reasoning with No Inference/Deduction The reason is quite obvious. The rule cannot work because in the conclusion you have a non-bound variable ?Fahrenheit. By the way, you also have the variable ?Celsius for whatever reason in the premise. Obviously, both should be the corresponding RDF resources: @prefix units: <http://www.semanticweb.org/ullahi/ontologies/2017/6/untitled-ontology-110#>. [rule1: (?t rdf:type units:GroveAirTemperatureValue), (?t units:hasTemperatureInCelsius ?tempval), (?t units:hasUnitOfMeasurement units:DegreeCelsius), product(?tempval, 1.8, ?prod), sum(?prod, 32, ?add) -> (?t units:hasTemperatureInFahrenheit ?add), (?t units:hasUnitOfMeasurement units:DegreeFahrenheit)] On 31.07.2017 15:16, Ullah, Izhar wrote: > [rule1: (?t rdf:type units:GroveAirTemperatureValue), (?t > units:hasTemperatureInCelsius ?tempval), (?t units:hasUnitOfMeasurement > ?Celsius), > product(?tempval, 1.8, ?prod), sum(?prod, 32, ?add) > > -> (?t units:hasTemperatureInFahrenheit ?add), > (?t units:hasUnitOfMeasurement ?Fahrenheit)]
