Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* scoring crossposts
@ 2006-04-15 16:14 Dale Henderson
  2006-04-15 17:00 ` Karl Kleinpaste
  0 siblings, 1 reply; 2+ messages in thread
From: Dale Henderson @ 2006-04-15 16:14 UTC (permalink / raw)



I'm trying to score crossposts down. I found this piece of code:

  ("xref"
   ;; the more cross posting, the exponentially worse the article
   ("^xref: \\S-+ \\S-+ \\S-+ \\S-+" -1 nil r)
   ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -2 nil r)
   ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -4 nil r)
   ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -8 nil r)
   ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -16 nil r)
   ...)

Then I noticed a massively crossposted article that wasn't
scored. When I investigated the headers, I noticed there was no Xref
header. 

So I was wondering could I score on the newsgroups header. According
to the documentation Newsgroups isn't a valid header to score on.


On another note, is there any way to check a header to see how many
times a particular regex matches and use the count to set the score. 
That is in the example above see how many times the regex \\S-+
matches the xref header and then set the score to 

(- (expt 2 (- count 3)))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-15 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-15 16:14 scoring crossposts Dale Henderson
2006-04-15 17:00 ` Karl Kleinpaste

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).