Gnus development mailing list
 help / color / mirror / Atom feed
* new var:  gnus-adative-word-minimum
@ 1997-12-04  0:31 Wes Hardaker
  0 siblings, 0 replies; only message in thread
From: Wes Hardaker @ 1997-12-04  0:31 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-12-04  0:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-04  0:31 new var: gnus-adative-word-minimum Wes Hardaker

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).