Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] SQWRL query help needed

Przemek W teonacatl at tlen.pl
Mon Oct 27 09:43:28 PDT 2008


Yes. I've realised that. But what should I use instead?

And btw I have another question: Can these queries return answers ONLY about
assertions? I've just realised that, when running the query it returns the
correct answers, if they were originaly defined in the Ontology. For example
there's just one kind of White Wine, and query's result is THAT ONE
PARTICULAR wine(which is OK, i think?). But after running reasoner, there
appear to be many more INFERRED White Wines(marked in hierarchy as blue).
But query still returns THE SAME ONE white wine.

Or am I doing something wrong again? :)



Martin O'Connor wrote:
> 
> swrlb:equal can be used for data valued properties only:
> 
> http://www.daml.org/2004/04/swrl/builtins.html#8.1
> 
> Martin
> 
> Quoting Przemek W <teonacatl at tlen.pl>:
> 
>>
>> I am trying to extract "Dry" wines from the wine ontology. The SQWRL
>> query :
>>
>> wine:Wine(?wine:x) ∧ wine:hasSugar(?wine:x, ?wine:y) ∧
>> swrlb:equal(?wine:y,
>> "Dry") → sqwrl:select(?wine:x)
>>
>> returns an exception:
>>
>> Exception running SQWRL queries: error running SQWRL queries: Jess
>> reported
>> an error in routine invokeSWRLBuiltIn
>> 	while executing (invokeSWRLBuiltIn
>> "http://www.w3.org/TR/2003/PR-owl-guide-20031209/sqwrlSweetWines"
>> "http://www.w3.org/2003/11/swrlb#equal" 0 false
>> ?http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#y(0,0,1) "Dry")
>> 	while executing rule LHS (Node2)
>> 	while executing rule LHS (Node2)
>> 	while executing rule LHS (MTELN)
>> 	while executing rule LHS (TECT)
>> 	while executing (assert
>> (MAIN::http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar
>> http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MariettaPetiteSyrah
>> http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry)).
>>   Message: error invoking built-in from Jess: exception thrown by
>> built-in
>> 'swrlb:equal' in rule
>> 'http://www.w3.org/TR/2003/PR-owl-guide-20031209/sqwrlSweetWines':
>> expecting
>> string, got individual with name
>> 'http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry' for (0-offset)
>> argument #0.
>>   Program text: ( assert (
>> http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar
>> http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MariettaPetiteSyrah
>> http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry ) )  at line 1
>> in
>> file <eval pipe>.
>>
>> I am assuming I can't use "swrlb:equal(?wine:y, "Dry")" here, because
>> "Dry"
>> is a string.
>> I was trying to use Built-ins from
>> http://www.daml.org/2004/04/swrl/builtins.html#8.4 but non of them worked
>> for me.
>>
>> I think my problem is similar to this one:
>> http://www.nabble.com/Res%3A--Simple-SQWRL-query-tt15841748.html#a15841748
>> ,
>> however when I reconstrunt my query into:
>>
>> wine:Wine(?wine:x)  ∧  wine:hasSugar(?wine:x, ?Dry) →
>> sqwrl:select(?wine:x),
>> it lists all the wines there are, it doesn't matter if I write ?Dry or
>> ?Sweet it always returns the same result.
>>
>> Any hints?
>> --
>> View this message in context:   
>> http://www.nabble.com/SQWRL-query-help-needed-tp20188665p20188665.html
>> Sent from the Protege - OWL mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> protege-owl mailing list
>> protege-owl at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>> Instructions for unsubscribing:   
>> http://protege.stanford.edu/doc/faq.html#01a.03
>>
> 
> 
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
> 
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03 
> 
> 

-- 
View this message in context: http://www.nabble.com/SQWRL-query-help-needed-tp20188665p20191473.html
Sent from the Protege - OWL mailing list archive at Nabble.com.




More information about the protege-owl mailing list