Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Dale Henderson <nilram@hotpop.com>
Subject: scoring crossposts
Date: 15 Apr 2006 11:14:50 -0500	[thread overview]
Message-ID: <87fykelssl.fsf@hotpop.com> (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)))

             reply	other threads:[~2006-04-15 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-15 16:14 Dale Henderson [this message]
2006-04-15 17:00 ` Karl Kleinpaste

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fykelssl.fsf@hotpop.com \
    --to=nilram@hotpop.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).