🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #189696

Re: dumb question...

#189696
From: Brian
Date: Tue, 22 Aug 2006 17:05
247 lines
9457 bytes
sittingduck wrote:
> Brian wrote:
> 
>> So, I have to "train" a score file, kinda' like a junk mail filter?
> 
> Yep.
> 
> Intro to Xnews' score file.
> 
> Xnews happily steals the scoring system concept from slrn.  Basically, each 
> article is assigned a score from -9999 to 9999.  By default, an article has 
> score 0 (no score, or neutral).  Articles with score of -9999 or less are 
> killed (you'll never see them, unless you turn off hard kill, in which case 
> they show up with a red X icon).  Articles with score of 9999 or more are 
> considered "important" and flagged with a yellow ! icon.  
> 
> Xnews scores articles using rules you specify in the score file score.ini.  
> This file is a plain text file which you can edit with any text editor 
> (Notepad will do). Spaces, tabs, and blank lines are ignored except in 
> keywords and regular expressions.  The score file consists of sections (like 
> ini files).  Each section begins with a section header
> 
> 	[group-regular-expression]
> 
> that is, a regular expression surrounded by [ ]  The header indicates which 
> groups this section applies to.  For example,
> 
> 	[.]
> 
> indicates this section applies to all groups.
> 
> 	[^alt\.binaries]
> 
> indicates this section applies to all groups starting with 'alt.binaries'
> 
> 	[babylon|trek]
> 
> indicates this section applies to all groups containing the word 'babylon' or 
> 'trek'.
> 
> If group-regular-expression is preceded with a tilde (~), then the meaning is 
> inverted.  For example, [~babylon|trek] applies to all groups that do NOT 
> contain either 'babylon' or 'trek'
> 
> Within each group, you have one or more scoring rules.  Each rule begins like 
> so:
> 
> 	Score: number
> 
> that is, the keyword 'Score', followed by ':', followed by one or more 
> spaces, then an integer from -9999 to 9999.
> 
> You define each rule by specifying one or more of these headers.and the 
> expression to match, like so
> 
> 	keyword: expression-to-match
> 
> where keyword is one of: 
> 
> 	Message-ID, Subject, From, Xref, Lines, References
> 
> Here's an example:
> 
> 
> [.]
> 	Score: -9999
> 	Subject: \$\$\$+
> 
> 	Score: 9999
> 	From: luu.*tran
> 
> The two rules above apply to all groups.  The first assigns a score of -9999 
> (i.e., kills) any article which has three or more consecutive $ in the 
> subject.  The second marks as important any article whose author is yours 
> truly (ah, ego runs amok!).
> 
> If you precede keyword with a ~, then the meaning is inverted.  so
> 
> 	Score: -1000
> 	~Subject: mulder|sculley
> 
> subtract 1000 from the score any article that does NOT mention mulder or 
> sculley in the subject.
> 
> When the keyword is Lines, then the expression-to-match is an integer 
> specifying the minimum number of lines.  For example,
> 
> 	[~binaries]
> 		Score: -9999
> 		Lines: 1000
> 		~Subject: faq|rfd|rfc
> 
> kills any article appearing outside a binaries group with more than 1000 
> lines AND is not a FAQ, RFC, or RFD.
> 
> 	On the other hand
> 
> 	[binaries]
> 		Score: -9999
> 		~Lines: 50
> 
> kills any article in a binaries group with 50 or fewer lines.
> 
> By the way, I'm only indenting these lines to make it more readable; it makes 
> no difference otherwise.  The only important thing is each of the lines above 
> must appear on a single line by itself.  Also, you can add comments by 
> putting a  percent sign (%) at the beginning of the line.
> 
> By default, each individual test must pass in order for the scoring rule to 
> apply, i.e., boolean AND is the default.  If you want to use boolean OR 
> instead, add an extra : after the Score keyword.  For example,
> 
> 	[^comp\.]
> 		Score:: -9999
> 		Lines: 1000
> 		Xref: advocacy
> 		From: beavis
> 		From: butthead
> 		
> 
> kills any article posted in a comp group which has more than 1000 lines, or 
> is crospposted to advocacy, or is from beavis or butthead.
> 
> Note that all keywords are case insensitive.  So too are all regular 
> expressions, so you don't need to write [Ff][Oo][Oo], just foo will do. If 
> you want the  expression-to-match to be case sensitive, then put an equal 
> sign instead of of a : after the keyword, e.g.
> 
> 
> 	[.]
> 		Score: -9999
> 		~Subject= .*[a-z]
> 
> kills anything that does not contain at least one lower case letter in the 
> subject.
> 
> Sections and rules within each session are applied in the order that they 
> aappear in the score file.  Each article starts out with a score of zero, 
> then for each rule that it passes, its score is incremented or decremented by 
> the rule's score value except when the rule's score value is -9999 or 9999, 
> in which case the program assigns that score and stops any further testing.  
> If you want to assign a single score other than 9999 or -9999, then put an 
> equal sign in front of the score value.  For example
> 
> 	Score: =500
> 	From: joey
> 
> means "if an article was posted by joey, then assign it a score of 500 and 
> don't bother looking at any other rule."
> 
> You can add an expiration date to each rule, after which time the rule will 
> no longer fires.  The format is
> 
> 	Expires: date
> 
> The line, if present, must appear immediately after a Score: line.  For 
> example
> 
> 	% this rule expires at the end of the millenium
> 	% (okay, the year 1999 anyway :)
> 
> 	Score: 2000
> 	Expires: 12/31/1999
> 	....
> 
> The date format is locale-dependent.  It's mm/dd/yyyy for those in the US and 
> dd/mm/yyyy for those in the UK and elsewhere.
> 
> If you have an empty section, then scoring for groups matching that section 
> will halt at that point.  For example, if you want to apply some scores to 
> binaries group, but not discussion binaries group, you can do this
> 
> [binaries.*\.d$]
> % this section is left intentionally empty.  It prevents the scores below 
> from 
> % being applied to binaries groups ending in .d
> 
> [binaries]
> 	Score: 2000
> 	......
> 
> Xnews' score file format is very similar to slrn's, with (at least) these 
> differences: 1) regular expressions are case insensitive in Xnews; 2) slrn 
> treats section headers as wildcard expressions while xnews treats them as 
> full regular expressions; 3) Xnews does NOT allow scoring on any header other 
> than those mentioned, namely, Message-ID, From, Subject, XRef, Lines, and 
> References;  and 4) as far as I know, slrn doesn't use the empty section as a 
> mean to stop evaluation.
> 
> You can read an intro to slrn score file at
> 
> 	http://kwaziwai.cc.columbia.edu/acis/tutor/slrnscore-txt.html
> 
> There's also a slrn score file FAQ at
> 
> 	http://kwaziwai.cc.columbia.edu/acis/tutor/slrnscorefile-faq.html
> 
> You can incorporate ideas in the FAQ to make your own score file, taking into 
> account the differences stated above.
> 
> 
> Luu Tran
> Feb 23, 1999
> 
> 
> 
> % sample score file
> % rename it as score.ini to use it
> % modify to suit your needs
> % read scoring.txt for instructions
> 
> % in all groups
> [.]
> 	% kill money spam and sex spam
> 	Score:: -9999
> 	Subject: \$\$\$+
> 	Subject: [fs]uck|sex|xxx+|naked|nude
> 
> 
> 	% kill if subject doesn't contain at least 1 lower case letter
> 	% i.e., kill all caps subject
> 	Score:: -9999
> 	~Subject= [a-z]
> 
> 	% kill followup to all caps subject while we're at it.
> 	Score: -9999
> 	Subject= ^[Rr][Ee]: [^a-z]*$
> 	Subject= ^[Rr][Ee]: .*[A-Z]
> 
> % unless in alt or binaries group
> [~alt|binaries]
> 	% kill stuff crossposted to binaries 
> 	Score:: -9999
> 	XRef: binaries
> 
> % in midi groups
> [midi]
> 	% kill anything with less than 80 lines
> 	Score: -9999
> 	~Lines: 80
> 
> % investment tracking
> [invest]
> 	Score: 9999
> 	Subject: dell|compaq|cpq|intel|intc

Wow, my head is spinning.  Thanks for all the info!
Technical Details
Message-ID: <12emead4imfedd1@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.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c06.usenetserver.com!news.usenetserver.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!193.201.147.81.MISMATCH!feed.xsnews.nl!feeder.xsnews.nl!138.199.65.86.MISMATCH!sn-xt-ams-06!sn-xt-ams-03!sn-post-ams-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
References: <12em6rer6qv64cd@corp.supernews.com> <Xns98277B4313F4Bmbeausympaticoca@130.133.1.4> <12emdm4s0vou1f@corp.supernews.com> <Xns9827659EA1B4duckrulestheuniverse@news.easynews.com>

Show Full Headers
Complete Article Headers
Message-ID: <12emead4imfedd1@corp.supernews.com>
Subject: Re: dumb question...
Date: Tue, 22 Aug 2006 13:05:17 -0400
From: Brian <nospam@nawbabynaw.com>
References: <12em6rer6qv64cd@corp.supernews.com> <Xns98277B4313F4Bmbeausympaticoca@130.133.1.4> <12emdm4s0vou1f@corp.supernews.com> <Xns9827659EA1B4duckrulestheuniverse@news.easynews.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.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c06.usenetserver.com!news.usenetserver.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!193.201.147.81.MISMATCH!feed.xsnews.nl!feeder.xsnews.nl!138.199.65.86.MISMATCH!sn-xt-ams-06!sn-xt-ams-03!sn-post-ams-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.readers
Organization: Posted via Supernews, http://www.supernews.com
User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719)
MIME-Version: 1.0
In-Reply-To: <Xns9827659EA1B4duckrulestheuniverse@news.easynews.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@supernews.com
Lines: 247