[rules-users] drools queries: strange dependency

Upali Kohomban upali at codegen.co.uk
Fri Apr 12 04:45:00 EDT 2013


Hi,

Sorry for the late reply, I was away from mail.

I'm fine with assumptions such as unique name and closed world because 
whatever method I use these handicaps will be there in some form. In my 
case, why I can't  go on with OWL/Logic is the issue of large amounts of 
factual data which change frequently, unlike, say, in Biomedical ontologies.

For an instance, I want to model the semantics of a country's appeal as 
a holiday destination for a particular crowd depending on any events 
that makes it interesting for that crowd. These things can change on 
day-to-day basis depending on weather, currency rates, school holidays, 
ticket prices etc. OWL ontologies (as you must know) handle these kind 
of volatile data quite poorly. Unfortunately, its difficult to plug 
things to the reasoner at the facts-end of the OWL. This last bit is 
different for Drools.

On the other hand, as I said, the number of possible inferences are near 
infinite, and unnecessary unless they are explicitly queried. For 
instance take a transitive relationship such as situated_in(x, y).  If 
there are few levels of locality (say, 
country/district/city/town/suburb) there will be so many unnecessary 
inferences for the relationship in drools rules. With a backward 
chaining reasoner, these inferences won't fire unless queried.

According to my limited understanding of drools, this is the main issue 
one could come up against using drools here. I was trying to work around 
that fact by using the (apparently recent) backward-chaining queries, 
and by delegating some of the worse (transitive etc) clauses to POJO. I 
really enjoy being able to do that, even if I'm doing it wrong and 
there's a better way ;-)

So far, I'm using a mix of technologies to get what I think is the best 
of both worlds: backward-chaining, POJO for logic itself at lower level 
for recursive rules, semantic classes to "store" inferences about stuff 
so they can be queried later.

If there is a better way of doing this, I'd really love to know it. I'm 
aware that this is not ideal problem for an expert system or an 
ontology. However I need to model a little bit of semantics than a 
database-only system, and do it in an easily changeable way.

Thanks,
Upali



On 12/04/2013 00:56, Davide Sottara wrote:
> Ontology Reasoners and Rule Engines are quite different, can be 
> integrated under some assumptions,
> but are definitely not easily interchangeable.. (unique name 
> assumption, closed world assumption, etc..)
> Which one is better pretty much depends on the use case, which also 
> dictates the required level of
> expressiveness of the language - even Fact++, Hermit and Pellet do not 
> support full FOL...
>
> This said, your case seems very interesting.. would you mind sharing a 
> few more details or a concrete example?
> We would then be able to assess whether Drools is appropriate or not, 
> and which constructs could be
> used (e.g. traits, hybrid chaining queries, tms, ...) to tackle the 
> complexity.
>
> Or maybe we could take it as a use case to improve the engine 
> capbilities :)
>
> Best
> Davide
>
>
>
>
> On 04/11/2013 05:01 AM, Upali Kohomban wrote:
>> Thanks a lot again, you made my life easy with the build instructions :)
>>
>> Yes I'm trying to do an integration. I have some experience with 
>> ontologies and want to experiment with drools as an alternative.
>>
>> OWL with reasoners like Fact ++ are pretty much good for the job, 
>> except for the fact that they handle individual data bits in quite a 
>> cumbersome way. It was because of this reason that I wanted to 
>> experiment on other ways of modeling a knowledge structure with 
>> better facilities for querying large amounts of factual data. I'm 
>> giving drools a try, but I'm not entirely sure if drools can do 
>> things as powerful as a reasoner.
>>
>> Basically, I'd like to be able to let the data lie (without firing 
>> any "events" until necessary)  and query the inferences in a 
>> first-order logic like manner. This is very space-efficient in 
>> data-heavy scenarios. I know that this isn't the traditional way 
>> drools is designed to work. I'm trying to solve the inference problem 
>> by dynamically adding semantic classes to each object to store all 
>> the possible inferences about it, so they can be queried later. 
>> Problem with this approach is that it gets out of hand very quickly, 
>> because the enumerated number of such inferences can be HUGE even for 
>> a moderate KB. Backward chaining will eventually solve this problem, 
>> but it seems that the constructs available for that in drools queries 
>> are not too matured at the moment. For instance they don't seem to 
>> support numerical inequality operators (or I am wrong, which is also 
>> very likely).
>>
>> Thank you again for the quick help,
>> Upali
>>
>>
>>
>>
>>
>>
>> On 11/04/2013 14:14, Davide Sottara wrote:
>>> You should be able to
>>> git clone ...
>>> the droolsjbpm repository, then
>>> git checkout -t origin/5.5.x
>>>
>>> this should switch to 5.5.1-SNAPSHOT (you can check the pom in the root
>>> folder)
>>> eventually, mvn clean install should do the trick.
>>>
>>> See also the readme.md in github
>>>
>>> Btw, it seems that you're working with rule/ontology integrations..
>>> would you
>>> be interested in sharing thoughts?
>>>
>>> Davide
>>>
>>> On

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130412/59a9316b/attachment-0001.html 


More information about the rules-users mailing list