pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] scorefile in 0.14.2.91


From: Charles Kerr
Subject: Re: [Pan-users] scorefile in 0.14.2.91
Date: Mon, 17 Jul 2006 17:56:17 -0500
User-agent: Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060420)

Ed Goforth wrote:

%BOS
[*]
Score: =-9999
  From: aol.com
%EOS

will Pan's scorefile parser barf?  Is this a legal rule?

I haven't tested it, but it looks legal to me.

Duncan's understandably confused about the wildcard usage: Pan attempts
to be compatable with slrn, which rolls its own regular expressions
(in the slang library) that supports wildmat.

So when reading the scorefile, Pan tests to see if the input are wildmat
strings or regular expressions.  We only use regex as a last resort
because wildmat tests are cheaper (usually a case-insensitive substring
test, which is heavily optimized in Pan).[1]

3. I see that Pan surrounds each rule with %BOS and %EOS.  Does it place
any significance in these or are they just for readability.

Yes, though not a major one.
%BOS and %EOS are used by the scorefile-tidying utility "cleanscore".

cheers,
Charles

[1] the code that decides whether to use wildmat or regex,
as well as the optimized case-insensitive substring search,
are in pan/general/text-match.cc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]