On Tue, 2004-03-09 at 04:15, Rick Cooper wrote:
Is that the Rick Cooper I know from college?
> Wouldn't this do what you want?
> body __RC_B_05 /(?:(?=totally|absolutely|best)\b(\w+)\b.*?){5}/i
> body __RC_B_06 /(?:(?=totally|absolutely|best)\b(\w+)\b.*?){6}/i
> body __RC_B_07 /(?:(?=totally|absolutely|best)\b(\w+)\b.*?){7}/i
> body __RC_B_08 /(?:(?=totally|absolutely|best)\b(\w+)\b.*?){8}/i
>
> meta RC_B_05 (__RC_B_05 && !__RC_B_06 && !__RC_B_07 &&
> !__RC_B_08)
> meta RC_B_06 (__RC_B_06 && !__RC_B_07 && !__RC_B_08)
> meta RC_B_07 (__RC_B_07 && !__RC_B_08)
> meta RC_B_08 (__RC_B_08)
>
> describe RC_B_05 BODY: Five Superlatives
> describe RC_B_06 BODY: Six Superlatives
> describe RC_B_07 BODY: Seven Superlatives
> describe RC_B_08 BODY: Eight Superlatives
>
> score RC_B_05 1.0
> score RC_B_06 1.5
> score RC_B_07 1.75
> score RC_B_08 2.0
Maybe, but I think this is a lot less opaque and easier for non-RE types
to understand and use:
body SUPERLATIVE /(totally|absolutely|best)/
describe SUPERLATIVE superlatives
score SUPERLATIVE .25
additive SUPERLATIVE
Granted, straight addition isn't terribly flexible. I really like
procmail's weighted scoring technique (see "man procmailsc"), where
subsequent matches can increase the score faster or slower. Maybe:
additive NAME [weight]
like:
score SUPERLATIVE .1
additive SUPERLATIVE 2
Which would give a sequence of scores something like:
matches score
1 .1
2 .3
3 .7
4 1.5
5 3.1
(The formula is more complex than the above example, but you get the
idea.)
--
John Hardin KA7OHZ
Internal Systems Administrator/Guru voice: (425) 672-1304
Apropos Retail Management Systems, Inc. fax: (425) 672-0192
-----------------------------------------------------------------------
If you smash a computer to bits with a mallet, that appears to count
as encryption in the state of Nevada.
- CRYPTO-GRAM 12/2001
-----------------------------------------------------------------------