03/03/2012 13:24, RW wrote:
 Amedeo Rinaldo wrote:
I cannot write tons of "meta __FLAG_X  (!THIS_RULE
&&  !THIS_OTHER_RULE&&  ..)"
I need some sort of match like "if AllFiredRules in (RuleA, RuleB,
RuleC, ...) ->  raise __FLAG_Y".

That is a simple RuleA&&  RuleB ... meta


Maybe I've not really understood the meta syntax, but IMHO ..
(sorry for my bad custom-meta-language and english)

<A>  fire __FLAGX   if AllFiredRules in (RuleA, RuleB, ..RuleN)

<B>  meta __FLAGX   RuleA && RuleB.. && RuleN


1) In <B> I cannot control not-in-the-list fired rules. We can have fired OtherRuleX and 'meta __FLAGX' is still fired. In <A> the check exclude the presence of not listed rules.

2) In <B> all rules must fire, in <A> we can have a not-fired-RuleN but still have a 'fire __FLAGX'.



What you can do is count rule like this:
meta __FLAG_Z    (rule1 + rule2 + rule3 + ... + ruleN)>= 3

Yes, but I cannot count not explicitly indicated ones.
Rules can change frequently (I can add my own) ..and furthermore it's insane to list all rules :-)

My idea was a 'fast logic' like:
- if num(fired-rules) > threshold -> SKIP
- if (fired-rules) not_in_array (RuleA,RuleB,..) -> SKIP
- ..

or even better  create your own parallel scoring system like this:
meta __FLAG_Z   ( 1.1*rule1 + 0.2*rule2 + ... + 2.9*ruleN)>= 5.0

well, good to know.. thanks


Have a nice week-end


--
 .''`. *Amedeo Rinaldo*
: :' : debian addicted ;-)
`. `'
  `-

Reply via email to