During
this period my main task was to integrate the converted Drools Rules to the
RelEx source code. For that first I just created a Drools State-full Knowledge
session which creates the Knowledge Base based on the converted Drools Rules
file. At the first debugging time, I got hell of errors, which is some what
expected since we had not done any debugging of created Drools rules before
that moment. So I started to look into each and every error thrown. Few errors
among hundreds of errors are noted below.
Import
statement was missing from the drools rules file: I altered the RuleConverter
code such that it adds that.
There
were lot of typos found in the RelEx2Frame hand written rule file, which
mislead our RuleConverter to generate malformed rules: I debugged and edited
the hand written rule file as needed.
Once I
made the Drools to create the KnowledgeBase successfully, I started to debug
the methods used inside the Drools rules which were implemented by Danaja and
Nisansa. They didn't have a way to debug there method earlier, so we expected
few bugs from those methods. I found few bugs in one of the methods (which is
the tricky method), and successfully fixed those bugs, and got the rules to
work.
Then I
found out that currently we were not outputting the given sentence related
output but only the rule. So I went ahead and implemented that functionality.
It needed few changes in the Drools rules file (i.e. RuleConverter) and also in
few methods in the RelEx2Frame. While doing this I observed that the 'then'
part of the rule is not get executed suddenly after the activation of a rule. I
had a discussion about this behaviour in Rules Users List
mailing list and got to know the following:
“ In the
rete algorithm the agenda is a list of activated rules who's actions are
eligible to fire. The "first" one on the list is selected, it's
action is fired, and the agenda might change as a result. "First" is
in quotes because the agenda list is sorted by conflict resolution rules.”
So I
altered the code a bit such that it solves this issue as well.
I did few
tests with the new Rule Engine, and found out it takes ages (10-15mins) to
display the resulted frame outputs. I raised this issue in front of my group
mates and made the point that a possible approach of caching which I have seen
in few mailing list discussions.
Further I
edited the existing RelEx build.xml file such that it adds necessary Drools
related executables to the classpath before compiling the source code.
We had
few discussions on preparing the design document as well, again Chamilka took
the lead and cooperated with others and divided separate parts among four of
us.
No comments:
Post a Comment