From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9038 Path: main.gmane.org!not-for-mail From: Felix Lee Newsgroups: gmane.emacs.gnus.general Subject: Re: adaptive word scoring Date: Fri, 29 Nov 1996 18:28:53 -0800 Sender: flee@teleport.com Message-ID: <199611300228.SAA21297@kim.teleport.com> References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035149124 16102 80.91.224.250 (20 Oct 2002 21:25:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:25:24 +0000 (UTC) Return-Path: Original-Received: (qmail 19535 invoked from smtpd); 30 Nov 1996 02:41:47 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 30 Nov 1996 02:41:36 -0000 Original-Received: from kim.teleport.com (kim.teleport.com [192.108.254.26]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sat, 30 Nov 1996 03:29:03 +0100 Original-Received: from teleport.com (pdx3-24.transport.com [206.163.35.121]) by kim.teleport.com (8.8.3/8.7.3) with ESMTP id SAA21297 for ; Fri, 29 Nov 1996 18:28:47 -0800 (PST) Original-To: ding@ifi.uio.no In-reply-to: Your message of 29 Nov 1996 16:45:10 +0100. Xref: main.gmane.org gmane.emacs.gnus.general:9038 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9038 Jan Vroonhof: > I agree. I have turned it of. I still have to figrue out away to > remove all the word rules it produced while I was still reading it. write a function :) tested with red gnus 0.52; looks like 0.71 will work. rampantly revises your ADAPT files. use at own risk. (require 'cl) (require 'gnus-score) (defun gnus-score-forget-words () "Remove all adaptive word scores." (gnus-score-map-adaptive-files 'gnus-score-forget-words-in-file)) (defun gnus-score-forget-words-in-file (file) "Remove adaptive word scores in FILE." (gnus-score-load-file file) (let ( (touched nil) (prev (assoc "subject" gnus-score-alist)) next ) (while (setq next (cdr prev)) (if (not (eq (nth 3 (car next)) 'w)) (setq prev next) (setcdr prev (cdr next)) (setq touched t))) (if touched (gnus-score-set 'touched '(t)))) (gnus-score-save) (message "done %s" file)) (defun gnus-score-map-adaptive-files (func) "Apply FUNC to all adaptive score files." ;; load the score-file list (gnus-score-score-files "") (let ( (files (cdr gnus-score-file-list)) (suffix (concat (regexp-quote gnus-adaptive-file-suffix) "$")) file ) (while files (setq file (pop files)) (if (string-match suffix file) (funcall func file)) )))