Article View: news.software.readers
Article #73598Re: Xnews score file too big for slrn?
From: J.B. Nicholson-Owens
Date: Thu, 15 Mar 2001 09:23
Date: Thu, 15 Mar 2001 09:23
123 lines
5831 bytes
5831 bytes
Generally speaking, it appears you need to read the score documentation that
comes with slrn source and S-Lang regex documentation. If you don't have
copies of both I'm sure can find them online somewhere.
M. Frolik wrote:
> My (mangled) score.ini is pasted below, can anyone tell me if I have to
> trim this down for slrn?
It looks like most of your scorefile is made up of comments and some invalid
sections (perhaps that is why slrn isn't behaving as you think it ought to).
Below is a summary of the operative part where I comment on the first
occurrence of each offending part.
> [.]
slrn uses wildmats, not regular expressions for newsgroup lists. Regular
expressions are more powerful but wildmats are easier for beginners to
understand. This means this entire section (until the next group list in
square brackets) applies only to a group called "." which doesn't exist. If
you want it to apply to all groups, you want to say "[*]".
> score:: -9999
If you mean to set the score to -9,999 I suggest using =-9999 instead as
it's more clear and will work as you expect in future slrn versions where
(to my understanding) magic score values are being removed.
> ~subject= .*[a-z]
I'm not sure what you meant to say here but this is invalid in slrn. The
equal sign should be a colon. Also ".*[a-z]" will match slowly when there's
a lot of backtracking to do. This depends greatly on the subjects this is
matching against. Later on you have some regexes that almost certainly mean
heavy backtracking.
> subject: ^E.*a.*r.*n
> subject= F.*R.*E.*E
Are you really sure you want these? They're awfully general. The first
will match "Eagle scouts aren't ready to tie knots?" as well as "Earn money
now!". Perhaps
Subject: ^e[^ \t]*a[^ \t]*r[^ \t]*n
Subject: \<f[^ \t]*r[^ \t]*e[^ \t]*e\>
is what you're looking for ('earn' at the beginning of the header content
with anything but whitespace in between the letters of 'earn' and 'free' as
a word with anything but whitespace in between the letters of 'free'?). By
the way, if you want case sensitivity in slrn's score regexes you have to
turn that on in each regex where you want it on.
> subject= M.*O.*N.*E.*Y.*|.*C.*A.*S.*H
The vertical bar is currently literal in S-Lang regular expressions. There
is presently no alternation in S-Lang regular expressions. This will be
almost entirely alleviated in the next slrn which features a more powerful
scoring syntax. You don't need to wait until the next slrn as you can use
two scoring rules to express this. There are alternation assumptions
throughout your scorefile. I recommend minimizing the use of ".*" as it
will kill performance in cases like this--backtracking galore. A leading or
trailing ".*" is a no-op ("money.*" is equivalent to "money" but the latter
is better). Also, like 'earn' and 'free' above, these are awfully general
stated as they are.
> score: -9999
> subject: ^[^a-z][^a-z][^a-z]
> subject: ^[^0-9][^0-9][^0-9]
Two things here:
(1) You can shorten this repeated pattern with the curly brace construct:
^[^a-z]\{3\}
(2) Since this is an ANDed expression, you can shorten this again by
specifying the complete set of excluded characters in the square
brackets:
^[^a-z0-9]\{3\}
So you end up matching (killing) any Subject: header that begins with three
non-alphanumerics (which is what I'm guessing you were trying to say here
anyhow).
> [gnu.emacs.sex]
> [alt.sex.fetish.linux]
Maybe it's a wrapping error, but this means nothing in slrn. You've begun
two sections with no score entries applying to these groups.
Continuing from the previous section:
> [sex|pictures|erotica]
If slrn used alternation regexes here you would only need the this construct
as the previous two have "sex" in them (and I doubt those meta dots would
match anything but periods considering the rest of the regex).
> score::-9999
> ~lines: 1000
> lines: 3000
Assuming your kill score is -9,999, slrn would see this as 'kill matching
articles with less than 1,001 lines or articles with more than 3,000 lines'.
So only 1,001-3,000 line articles will not be killed by this ruleset. This
is probably what you intended, but you should confirm this to be sure.
> subject: (pee\ )
Parentheses are matched literally unless escaped in S-Lang regular
expressions. You'll want "pee[ ]" here (I put the space in a character
class to prevent it from being removed by a text editor that truncates
trailing whitespace--I suspect you used the parentheses to achieve the same
effect.
> subject: (y\ 1[0-7]|1[0-7]\ y)
Sort of a continuation of the previous section: I don't know what the "\ "
is supposed to mean but in slrn it means a space. The escaping adds nothing
here.
Good luck fixing your scorefile.
Technical Details
Message-ID:
<slrn9b12da.1be.jbn@forestfield.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mailReferences:
<Xns9065E9498E43iamthearm@207.126.101.100>Show Full Headers
Complete Article Headers
Message-ID: <slrn9b12da.1be.jbn@forestfield.org> Subject: Re: Xnews score file too big for slrn? Date: Thu, 15 Mar 2001 09:23:19 +0000 From: jbn@forestfield.org (J.B. Nicholson-Owens) References: <Xns9065E9498E43iamthearm@207.126.101.100> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail Newsgroups: news.software.readers Organization: Forest Field OmniMedia Lines: 122 NNTP-Posting-Host: forestfield.org (208.216.67.173) X-Trace: fu-berlin.de 984648199 3269970 208.216.67.173 (16 [35848]) User-Agent: slrn/0.9.6.4 (Unix)