I see a lot of rules of the form:
     
    body __FOO_1 /phrase one/
    body __FOO_2 /phrase two/
    body __FOO_3 /phrase three/
    ...
     
    meta FOO_MULTI_2 ((__FOO_1 + __FOO_2 + __FOO_3 + ...) >= 2)
    meta FOO_MULTI_3 ((__FOO_1 + __FOO_2 + __FOO_3 + ...) >= 3)
    meta FOO_MULTI_4 ((__FOO_1 + __FOO_2 + __FOO_3 + ...) >= 4)
    ...
     
    score FOO_MULTI_2 0.5
    score FOO_MULTI_3 0.4 # additional to previous
    score FOO_MULTI_4 0.3 # additional to previous
    ...

The meta rules are long, repetitive, brittle, annoying to update.
Another problem is when you want to add to someone else's rule
group.  For example, let's say I want to add to the ADVANCE_FEE_#
group.  The only way would be to modify the 20_advance_fee.cf
file, rather than user/local preferences.

I propose something like this:

    body __FOO_1 /phrase one/
    group __FOO_1 FOO

    body __FOO_2 /phrase two/
    group __FOO_2 FOO

    body __FOO_3 /phrase three/
    group __FOO_3 FOO

Or:

    body __FOO_1 /phrase one/
    body __FOO_2 /phrase two/
    body __FOO_3 /phrase three/

    group FOO __FOO_1 __FOO_2
    group FOO __FOO_3

A numeric "variable" like "meta FOO (__FOO_1 + __FOO_2 + ...)"
could alleviate the redundancy problem, but the key advantage of
the "group" proposal is that new rules can be added to the group
later.  The score rule could look like:

    multiscore FOO 0.0 0.5 0.9 1.2 ...

or:

    multiscore FOO >= 2 0.5
    multiscore FOO >= 3 0.9
    multiscore FOO >= 4 1.2

-- 
Karl 2006-12-21 22:24

Reply via email to