🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
10 messages
10 total messages Started by TheWanderer Wed, 09 May 2007 16:49
[XNews] A question: How to filter?
#199250
Author: TheWanderer
Date: Wed, 09 May 2007 16:49
16 lines
1600 bytes
Q: How does one set up a filter that can kill any article with a 
particular word in the subject? Say that I simply want any 
article with the word "casino", for instance, to simply go away?

Can you include multiple words per filter, or would one separate 
filter per term work better?

Can the filter, if it exists, of course, be used to screen 
"partial" terms, like "[filename].mpg"?

Thanks in advance!
-- 
=========================

TheWanderer
Re: [XNews] A question: How to filter?
#199251
Author: sittingduck
Date: Wed, 09 May 2007 17:02
15 lines
1766 bytes
TheWanderer wrote:

> Q: How does one set up a filter that can kill any article with a 
> particular word in the subject? Say that I simply want any 
> article with the word "casino", for instance, to simply go away?
> 
> Can you include multiple words per filter, or would one separate 
> filter per term work better?
> 
> Can the filter, if it exists, of course, be used to screen 
> "partial" terms, like "[filename].mpg"?

Xnews does scoring, and can accomplish what you want VERY easily. Have a look 
in your Xnews folder for the files: scoring.txt, and sample-score.ini. Come 
back if you have more specific questions.
Re: [XNews] A question: How to filter?
#199255
Author: TheWanderer
Date: Wed, 09 May 2007 18:15
30 lines
2204 bytes
sittingduck <you.love.sitting-duck@spamgourmet.com> wrote in
news:Xns992B6624675A6duckrulestheuniverse@invalid.quakefour.ne
t: 

> TheWanderer wrote:
> 
>> Q: How does one set up a filter that can kill any article
>> with a particular word in the subject? Say that I simply
>> want any article with the word "casino", for instance, to
>> simply go away? 
>> 
>> Can you include multiple words per filter, or would one
>> separate filter per term work better?
>> 
>> Can the filter, if it exists, of course, be used to screen
>> "partial" terms, like "[filename].mpg"?
> 
> Xnews does scoring, and can accomplish what you want VERY
> easily. Have a look in your Xnews folder for the files:
> scoring.txt, and sample-score.ini. Come back if you have
> more specific questions. 
> 

Thanks -- my eyes used to glaze over on scoring. Too much like 
math. I think I'm getting it now.

-- 
=========================

TheWanderer
Re: [XNews] A question: How to filter?
#199264
Author: sittingduck
Date: Wed, 09 May 2007 19:45
11 lines
1837 bytes
TheWanderer wrote:

> Thanks -- my eyes used to glaze over on scoring. Too much like 
> math. I think I'm getting it now.

It's pretty simple once you understand the basic concept. :)
One trick that seems to help, is to create a score by right-clicking an 
article and using the menus. Then go to "Special|Edit score file" and edit 
what you just created. I found the sample file to be very helpful. I think 
Tech Zero (a group regular) has a very large scorefile sample online, which 
might be worth finding.
Re: [XNews] A question: How to filter?
#199355
Author: Peter J Ross
Date: Fri, 11 May 2007 13:25
70 lines
2977 bytes
In news.software.readers on 09 May 2007 16:49:27 GMT, TheWanderer
<eric_t2006-usenet@NOSPAMyahoo.com> wrote:

> Q: How does one set up a filter that can kill any article with a 
> particular word in the subject? Say that I simply want any 
> article with the word "casino", for instance, to simply go away?

Score: =-9999
	Subject: casino

> Can you include multiple words per filter, or would one separate 
> filter per term work better?

Score: =-9999
	Subject: casino|lottery|bingo

Score:: =-9999
	Subject: casino
	Subject: lottery
	Subject: bingo

Score: =-9999
	Subject: casino
Score: =-9999
	Subject: lottery
Score: =-9999
	Subject: bingo

These three should all work exactly the same way.

> Can the filter, if it exists, of course, be used to screen 
> "partial" terms, like "[filename].mpg"?

Usually, the expression in the filter will match part of a word *or* a
whole word, so you'd use

	Subject: \.mpg

(where "\." matches the dot; "." would match any character).

If you wanted to match only whole words, you'd use "\b" to match word
boundaries.  Examples:

	Subject: fred
	% matches the words fred, alfred and frederick

	Subject: \bfred
	% matches fred and frederick, but not alfred

	Subject: fred\b
	% matches fred and alfred, but not frederick

	Subject: \bfred\b
	% matches only fred

	Subject: casino\b
	% matches casino but not casinos

And finally, a rather advanced one to catch plurals and misspellings,
which some study of the XNews documentation should explain:

	Subject: \b(casino(s|es)?|lot{1,2}er(y|ies)|bingo)\b
	% matches the words casino, casinos, casinoes, lottery,
	% lotteries, lotery, loteries and bingo, and nothing else.

You can match all the words in separate rules if you find it easier,
but after learning how to walk, learning how to run can be fun too.

-- 
PJR :-)
Re: [XNews] A question: How to filter?
#199370
Author: TheWanderer
Date: Fri, 11 May 2007 19:38
83 lines
3494 bytes
Peter J Ross <pjr@example.invalid> wrote in
news:slrnf48rmc.3db.pjr@pjr.gotdns.org: 

> In news.software.readers on 09 May 2007 16:49:27 GMT,
> TheWanderer <eric_t2006-usenet@NOSPAMyahoo.com> wrote:
> 
>> Q: How does one set up a filter that can kill any article
>> with a particular word in the subject? Say that I simply
>> want any article with the word "casino", for instance, to
>> simply go away? 
> 
> Score: =-9999
>      Subject: casino
> 
>> Can you include multiple words per filter, or would one
>> separate filter per term work better?
> 
> Score: =-9999
>      Subject: casino|lottery|bingo
> 
> Score:: =-9999
>      Subject: casino
>      Subject: lottery
>      Subject: bingo
> 
> Score: =-9999
>      Subject: casino
> Score: =-9999
>      Subject: lottery
> Score: =-9999
>      Subject: bingo
> 
> These three should all work exactly the same way.
> 
>> Can the filter, if it exists, of course, be used to screen
>> "partial" terms, like "[filename].mpg"?
> 
> Usually, the expression in the filter will match part of a
> word *or* a whole word, so you'd use
> 
>      Subject: \.mpg
> 
> (where "\." matches the dot; "." would match any
> character). 
> 
> If you wanted to match only whole words, you'd use "\b" to
> match word boundaries.  Examples:
> 
>      Subject: fred
>      % matches the words fred, alfred and frederick
> 
>      Subject: \bfred
>      % matches fred and frederick, but not alfred
> 
>      Subject: fred\b
>      % matches fred and alfred, but not frederick
> 
>      Subject: \bfred\b
>      % matches only fred
> 
>      Subject: casino\b
>      % matches casino but not casinos
> 
> And finally, a rather advanced one to catch plurals and
> misspellings, which some study of the XNews documentation
> should explain: 
> 
>      Subject: \b(casino(s|es)?|lot{1,2}er(y|ies)|bingo)\b
>      % matches the words casino, casinos, casinoes,
>      lottery, % lotteries, lotery, loteries and bingo, and
>      nothing else. 
> 
> You can match all the words in separate rules if you find
> it easier, but after learning how to walk, learning how to
> run can be fun too. 
> 

Bravo. Thanks!

-- 
=========================

TheWanderer
Re: [XNews] A question: How to filter?
#199453
Author: Tech Zero
Date: Mon, 14 May 2007 23:59
37 lines
2444 bytes
Reality folded in on itself, and somewhere the following words from
"TheWanderer" appeared in history:

> Q: How does one set up a filter that can kill any article with a
> particular word in the subject?

   Score: -9000
      Subject: yata

> Say that I simply want any article with the word "casino", for
> instance, to simply go away?

   Score: -9999
      Subject: casino

> Can you include multiple words per filter, or would one separate
> filter per term work better?

Nah, just layer em on...

I try to keep each line related but all three of the entries that
Pete mentined do the same thing. The code Luu uses for Pcre is a
little more efficent with all three test words on a one line entry,
but the speed difrences are not even noticable on todays systems.

> Can the filter, if it exists, of course, be used to screen
> "partial" terms, like "[filename].mpg"?

Sure, with a little regex... Check out:

   http://www.dragonfur.ca/xnews/xn_score.shtml

-- 
__ __| |            __ __|           |    __  /
   |     \    -_)      |   -_)   _|    \     /    -_)   _| _ \
  _|  _| _| \___|     _| \___| \__| _| _| ____| \___| _| \___/
Losing quality sleep helping others on-line since 1997...
Re: [XNews] A question: How to filter?
#199454
Author: Tech Zero
Date: Tue, 15 May 2007 00:12
41 lines
2780 bytes
Reality folded in on itself, and somewhere the following words from
"Peter J Ross" appeared in history:

> And finally, a rather advanced one to catch plurals and
> misspellings, which some study of the XNews documentation should
> explain:
>
>      Subject: \b(casino(s|es)?|lot{1,2}er(y|ies)|bingo)\b
>      % matches the words casino, casinos, casinoes, lottery,
>      % lotteries, lotery, loteries and bingo, and nothing else.
>
> You can match all the words in separate rules if you find it
> easier, but after learning how to walk, learning how to run can be
> fun too.

Probability falls into play when creating good entries. All that
extra regex won't do any harm, but it will not add anything of use
either.

For the same affect, minus the extras, this should do:

   Score: -9000
      Subject: casino|lott?er[yi]|bingo

The reason?

Adding "(s|es)?" is only need if you lock in the term with a bondary,
it would have been better to leave it outside rather then incure four
loops to test for a matching entery.

Using "?" for an optional charictor is just cleaner then using
repitition. And as long as your not using "/b" there is no real need
to look for "(y|ies)", or probably not even "[yi]".

Call me a minamilist, but I like readable entries.

-- 
__ __| |            __ __|           |    __  /
   |     \    -_)      |   -_)   _|    \     /    -_)   _| _ \
  _|  _| _| \___|     _| \___| \__| _| _| ____| \___| _| \___/
Losing quality sleep helping others on-line since 1997...
Re: [XNews] A question: How to filter?
#199500
Author: Peter J Ross
Date: Wed, 16 May 2007 13:00
54 lines
3050 bytes
In news.software.readers on Mon, 14 May 2007 18:12:04 -0600, Tech Zero
<uselesspam@dragonfur.ca> wrote:

> Reality folded in on itself, and somewhere the following words from
> "Peter J Ross" appeared in history:
>
>> And finally, a rather advanced one to catch plurals and
>> misspellings, which some study of the XNews documentation should
>> explain:
>>
>>      Subject: \b(casino(s|es)?|lot{1,2}er(y|ies)|bingo)\b
>>      % matches the words casino, casinos, casinoes, lottery,
>>      % lotteries, lotery, loteries and bingo, and nothing else.
>>
>> You can match all the words in separate rules if you find it
>> easier, but after learning how to walk, learning how to run can be
>> fun too.
>
> Probability falls into play when creating good entries. All that
> extra regex won't do any harm, but it will not add anything of use
> either.

Sure, but I was deliberately contriving something complicated as an
example of the complexity that's possible if needed. All the OP's
request needs is "casino" or possibly "casino\b"

> For the same affect, minus the extras, this should do:
>
>    Score: -9000
>       Subject: casino|lott?er[yi]|bingo
>
> The reason?
>
> Adding "(s|es)?" is only need if you lock in the term with a bondary,
> it would have been better to leave it outside rather then incure four
> loops to test for a matching entery.
>
> Using "?" for an optional charictor is just cleaner then using
> repitition.

Yes. But I wanted to include "{1,2}" just to show that the syntax
exists.

> And as long as your not using "/b" there is no real need
> to look for "(y|ies)", or probably not even "[yi]".

"plotter" and "blotter" would match "lott?er".

> Call me a minamilist, but I like readable entries.

I like highly compressed ones. They're pretty!

-- 
PJR :-)
Re: [XNews] A question: How to filter?
#199533
Author: Tech Zero
Date: Thu, 17 May 2007 19:06
20 lines
1946 bytes
Reality folded in on itself, and somewhere the following words from
"Peter J Ross" appeared in history:

  <snip>
>> And as long as your not using "/b" there is no real need
>> to look for "(y|ies)", or probably not even "[yi]".
>
> "plotter" and "blotter" would match "lott?er".


Well then, just one use of "/b" then...  };8)

   Score: -9000
      Subject: casino|\blott?er|bingo

-- 
__ __| |            __ __|           |    __  /
   |     \    -_)      |   -_)   _|    \     /    -_)   _| _ \
  _|  _| _| \___|     _| \___| \__| _| _| ____| \___| _| \___/
Losing quality sleep helping others on-line since 1997...
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads