On Sat, 2009-10-10 at 18:14 -0400, Adam Katz wrote: > > > > > meta NAME rule1 && (rule2a + rule2b + rule2c + rule2d > 2) > > > > When adding rules is it a count of the number of rules or the rule > > > > scores? > > > > It is never the score.
> Here's my workaround. It involves some redundancy, but it does the trick: After some brief moment of head scratching... The "workaround" basically is just weighting sub-rules in the meta, and works regardless if it is meant to be the individual sub-rules' scores or not. It is useful, IFF one actually wants to weight sub-rules, which in practice is very uncommon. > # supposing: > score rule2a 1.3 > score rule2b 1.6 > score rule2c 0.8 > # you can compare score sums like this: > meta NAME rule 1 && (rule2a * 1.3 + rule2b * 1.6 + rule2c * 0.8 > 2) FWIW, the weights in this example are indeed redundant. Given the weights, any 2 sub-rule hits is greater than 2 -- dropping the weights from the equation and requiring >= 2 or > 1 instead does the same. :) > (huzzah for mixing logic with arithmetic.) -- char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}