From: Wes Hardaker <wjhardaker@ucdavis.edu>
Subject: new var: gnus-adative-word-minimum
Date: 03 Dec 1997 16:31:01 -0800 [thread overview]
Message-ID: <x7g1oac5kq.fsf@des.castles.com> (raw)
Finally got around to doing what I wanted with adaptive word scoring
where it limits the lower limits of the word scoring to a given value,
which I set to 0... I only want words to go up above 0 (and possibly
back) but never below 0.
How it should be done instead (I say this a lot don't I?):
(setq gnus-adaptive-limits '((word -10)
("subject" -20)
("author" 0)))
IE, its annoying to have SL Baur marked down to -250 just because he
writes 90% of comp.emacs.xemacs, and you only read 40% of it even
though you only read his articles.
However, the adaptive line scoring is done as a mesh with the normal user based
scoring, which should allow sets below the limit imposed above, hence
the reason I didn't implement it for line scoring like I should
have... It's going to require more to make gnus-score-set distinguish
when it should screw with scores based on limits and when it
shouldn't.
--
"Ninjas aren't dangerous. They're more afraid of you than you are of them."
Index: gnus-score.el
===================================================================
RCS file: /home/hardaker/src/cvsroot/qgnus/gnus-score.el,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 gnus-score.el
*** gnus-score.el 1997/11/26 18:47:12 1.1.1.4
--- gnus-score.el 1997/12/04 00:08:11
***************
*** 259,264 ****
--- 259,269 ----
:type '(repeat (cons (character :tag "Mark")
(integer :tag "Score"))))
+ (defcustom gnus-adaptive-word-minimum nil
+ "if non-nil: minimum score value that can be assigned to a word"
+ :group 'gnus-score-adapt
+ :type '(choice (const nil) integer))
+
(defcustom gnus-score-mimic-keymap nil
"*Have the score entry functions pretend that they are a keymap."
:group 'gnus-score-default
***************
*** 2170,2176 ****
;; Put the word and score into the hashtb.
(setq val (gnus-gethash (setq word (match-string 0))
hashtb))
! (gnus-sethash word (+ (or val 0) score) hashtb))
(erase-buffer))))
(set-syntax-table syntab))
;; Make all the ignorable words ignored.
--- 2175,2185 ----
;; Put the word and score into the hashtb.
(setq val (gnus-gethash (setq word (match-string 0))
hashtb))
! (setq val (+ score (or val 0)))
! (if (and gnus-adaptive-word-minimum
! (< val gnus-adaptive-word-minimum))
! (setq val gnus-adaptive-word-minimum))
! (gnus-sethash word val hashtb))
(erase-buffer))))
(set-syntax-table syntab))
;; Make all the ignorable words ignored.
reply other threads:[~1997-12-04 0:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=x7g1oac5kq.fsf@des.castles.com \
--to=wjhardaker@ucdavis.edu \
/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).