On 13 August 2010 18:36, Manav <span dir="ltr"><<a href="mailto:manav7574@yahoo.com">manav7574@yahoo.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Your explanation is absolutely superb. I modified my drl as per your suggestions and it's just been completely transformed. Just one question regarding one suggestion below :</div>
<div> </div>
<div>-- is this something like a for each loop in java . This is the first example i have seen in drl </div></div></div></blockquote><div><br>In a way, yes. Since<br> Foo( ... ) # match any Foo according to constraints, if any<br>
Bar( ... ) # match any Bar according to constraints, if any<br>these two patterns produce the Cartesian product, such as a nested loop does. BUT, the order of the pairings is indeterministic, and changes in WM might influence this loop, even make it infinitive. Therefore, "in a way". <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>-- will this automatically iterate over as many languages as have been inserted ? </div></div></div></blockquote><div><br>That's the whole idea :-)<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>-- the inserts .. don't they have to be within a rule block ? or did you just omit other things to keep it simple<br></div></div></div></blockquote><div><br>You can do it in the Java application framework. You can also write a high-salience one-shot rule such as<br>
<br>rule "1st shot"<br>when<br>then <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div></div><div class="im">
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;">insert( new Language( "Japanese" ) ); <br>insert( new Language( "French" ) ); <br>// more of the same<br></div></div></div>
</div></blockquote><div>end<br><br>Cheers<br>Wolfgang <br><br></div></div><br>