On Tue, 2009-07-07 at 14:33 +0200, Peter Daum wrote:
> Just for clarification:
>
> - I guess, your answer implies that the only way to write a rule where each
> of several tests must match is via such a "meta" rule? (i.e. there is no
> way to write a "regular" rule with multiple tests that must all match)
>
That's the most general way. However, the hidden rules can be added:
meta RX ((__r1 + __r2 + __r3) > 2.0)
as the easiest way of saying that any two or three subrules must fire to
trigger the meta. You can often generalise phrases:
/(account|personal|enter).{1,30}information/i
but this may not solve the problem because it implies some sort of
textual ordering which is never implicit in a meta rule.
Its often useful to develop a rule without the underscores so you can
see what is firing, e.g. I have an MG_MONEY rule that recognises
monetary amounts and scores them as 0.1 and a MG_SF to recognise
Sourceforge mailing lists and scores them as 0.01. They also get used as
components in a meta to deliver an extra kicking, for instance terms
that appear in medical spam may be innocuous by themselves, but several
of them in combination mean spam.
> - there is nothing specific to "hidden tests" (i.e. tests whose name starts
> with 2 underscores) about the meta rule mechanism, so meta rules can
> arbitrarily
> combine any other rules
>
Correct.
> - whereas "hidden" tests are only useful for meta rules (when I prepend "__"
> to
> the name of some other rule, it is not only hidden, but also ends up with
> a
> score of 0, even if there is some other score explicitly assigned)
>
No, I think it carries a score of 1 (or the addition trick wouldn't
work) but 'hidden' rules don't get added into the overall score.
Martin