Article View: news.software.readers
Article #73616Re: Xnews score file too big for slrn?
From: M. Frolik
Date: Thu, 15 Mar 2001 17:49
Date: Thu, 15 Mar 2001 17:49
141 lines
6624 bytes
6624 bytes
In article <slrn9b12da.1be.jbn@forestfield.org>, J.B. Nicholson-Owens wrote:
>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\>
>
A sacrifice I was willing to make, until I learned how to improve the regexp.
>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
It was aimed at the "M"A"K"E"M"O"N"E"Y"N"O"W" articles.
>
>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\}
>
Thanks, I'll try that.
> (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.
>
In Xnews it exempts the groups above.
>Continuing from the previous section:
>
>> [sex|pictures|erotica]
>
Yeah, it matched basicly all the porn groups.
>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)
It works with Xnews
>
>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.
In Xnews it was necessary to escape spaces.
>
>Good luck fixing your scorefile
I did fix my score file, before I posted, but all I really did was:change the
group names to comma delimited lists with asterisks, replace the score='s with
score:'s using \c for case sensitivity. The differences were minor and it was
marginally more convenient to grab the xnews score file, so thats ewhat you
got, sorry about that.
Technical Details
Message-ID:
<tb204cq8cmaiff@corp.supernews.com>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!feed.textport.net!sn-xit-04!sn-post-01!supernews.com!corp.supernews.com!notmyrealemailReferences:
<Xns9065E9498E43iamthearm@207.126.101.100> <slrn9b12da.1be.jbn@forestfield.org>Show Full Headers
Complete Article Headers
Message-ID: <tb204cq8cmaiff@corp.supernews.com> Subject: Re: Xnews score file too big for slrn? Date: Thu, 15 Mar 2001 17:49:00 -0000 From: notmyrealemail@account.fake (M. Frolik) References: <Xns9065E9498E43iamthearm@207.126.101.100> <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!feed.textport.net!sn-xit-04!sn-post-01!supernews.com!corp.supernews.com!notmyrealemail Newsgroups: news.software.readers Organization: Posted via Supernews, http://www.supernews.com Reply-To: chuckroast@mailandnews.com User-Agent: slrn/0.9.6.3 (Win32) X-Complaints-To: newsabuse@supernews.com Lines: 140