On Wed, 17 Feb 2021 10:23:13 -0500 Jared Hall wrote: > On 2/16/2021 2:06 PM, RW wrote:
> > I don't think there's much, if anything, in that module that > > benefits from being in perl. > Counts and amounts; even variable arithmetic amounts based on counts. > Everything else is just a regex. You can do that with meta rules, which support arithmetic and comparison operators. You can count regex hits with the "multiple" flag and an optional "maxhits=...". > > Also the "adaptive scoring" seems like a bad idea to me. The scores > > are hard-coded fractions of one of the three thresholds. The choice > > of which threshold is used is also hard-coded per rule. The only > > sense in which it's adaptive is that it opposes an admin adjusting > > how aggressive the filtering should be. > Yes, perhaps. But armed with a rule, a score, and a baseline > reference like {chaos_tag}, I'm not sure what you mean by "armed with...a score", most of the rules are scored like this: $score = 0.33 * $pms->{conf}->{chaos_tag}; governed by a single global tunable and various hard-coded multipliers. > Downloading ANYBODY's rules is a risk, since one > does not know the context in which the rules were developed. Which is why the scores need to be overridden on a per rule basis. Some rules translate to another system much better than others. For example rules about emojis developed in a corporate environment may not work as well on student mail. The chief problem with your scoring is that it overrides scores in the local configuration where score overrides would normally go.