+++ /dev/null
-;;; gnus-gl.el --- an interface to GroupLens for Gnus
-
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-;; Free Software Foundation, Inc.
-
-;; Author: Brad Miller <bmiller@cs.umn.edu>
-;; Keywords: news, score
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; GroupLens software and documentation is copyright (c) 1995 by Paul
-;; Resnick (Massachusetts Institute of Technology); Brad Miller, John
-;; Riedl, Jon Herlocker, and Joseph Konstan (University of Minnesota),
-;; and David Maltz (Carnegie-Mellon University).
-;;
-;; Permission to use, copy, modify, and distribute this documentation
-;; for non-commercial and commercial purposes without fee is hereby
-;; granted provided that this copyright notice and permission notice
-;; appears in all copies and that the names of the individuals and
-;; institutions holding this copyright are not used in advertising or
-;; publicity pertaining to this software without specific, written
-;; prior permission. The copyright holders make no representations
-;; about the suitability of this software and documentation for any
-;; purpose. It is provided ``as is'' without express or implied
-;; warranty.
-;;
-;; The copyright holders request that they be notified of
-;; modifications of this code. Please send electronic mail to
-;; grouplens@cs.umn.edu for more information or to announce derived
-;; works.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Author: Brad Miller
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; User Documentation:
-;; To use GroupLens you must load this file.
-;; You must also register a pseudonym with the Better Bit Bureau.
-;; http://www.cs.umn.edu/Research/GroupLens
-;;
-;; ---------------- For your .emacs or .gnus file ----------------
-;;
-;; As of version 2.5, grouplens now works as a minor mode of
-;; gnus-summary-mode. To get make that work you just need a couple of
-;; hooks.
-;; (setq gnus-use-grouplens t)
-;; (setq grouplens-pseudonym "")
-;; (setq grouplens-bbb-host "grouplens.cs.umn.edu")
-;;
-;; (setq gnus-summary-default-score 0)
-;;
-;; USING GROUPLENS
-;; How do I Rate an article??
-;; Before you type n to go to the next article, hit a number from 1-5
-;; Type r in the summary buffer and you will be prompted.
-;; Note that when you're in grouplens-minor-mode 'r' masks the
-;; usual reply binding for 'r'
-;;
-;; What if, Gasp, I find a bug???
-;; Please type M-x gnus-gl-submit-bug-report. This will set up a
-;; mail buffer with the state of variables and buffers that will help
-;; me debug the problem. A short description up front would help too!
-;;
-;; How do I display the prediction for an article:
-;; If you set the gnus-summary-line-format as shown above, the score
-;; (prediction) will be shown automatically.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Programmer Notes
-;; 10/9/95
-;; gnus-scores-articles contains the articles
-;; When scoring is done, the call tree looks something like:
-;; gnus-possibly-score-headers
-;; ==> gnus-score-headers
-;; ==> gnus-score-load-file
-;; ==> get-all-mids (from the eval form)
-;;
-;; it would be nice to have one that gets called after all the other
-;; headers have been scored.
-;; we may want a variable gnus-grouplens-scale-factor
-;; and gnus-grouplens-offset this would probably be either -3 or 0
-;; to make the scores centered around zero or not.
-;; Notes 10/12/95
-;; According to Lars, Norse god of gnus, the simple way to insert a
-;; call to an external function is to have a function added to the
-;; variable gnus-score-find-files-function This new function
-;; gnus-grouplens-score-alist will return a core alist that
-;; has (("message-id" ("<message-id-xxxx>" score) ("<message-id-xxxy>" score))
-;; This seems like it would be pretty inefficient, though workable.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; TODO
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; 3. Add some more ways to rate messages
-;; 4. Better error handling for token timeouts.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bugs
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-(require 'gnus-score)
-(require 'gnus)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; User variables
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar gnus-summary-grouplens-line-format
- "%U\%R\%z%l%I\%(%[%4L: %-23,23n%]%) %s\n"
- "*The line format spec in summary GroupLens mode buffers.")
-
-(defvar grouplens-pseudonym ""
- "User's pseudonym.
-This pseudonym is obtained during the registration process")
-
-(defvar grouplens-bbb-host "grouplens.cs.umn.edu"
- "Host where the bbbd is running.")
-
-(defvar grouplens-bbb-port 9000
- "Port where the bbbd is listening.")
-
-(defvar grouplens-newsgroups
- '("comp.groupware" "comp.human-factors" "comp.lang.c++"
- "comp.lang.java" "comp.os.linux.admin" "comp.os.linux.advocacy"
- "comp.os.linux.announce" "comp.os.linux.answers"
- "comp.os.linux.development" "comp.os.linux.development.apps"
- "comp.os.linux.development.system" "comp.os.linux.hardware"
- "comp.os.linux.help" "comp.os.linux.m68k" "comp.os.linux.misc"
- "comp.os.linux.networking" "comp.os.linux.setup" "comp.os.linux.x"
- "mn.general" "rec.arts.movies" "rec.arts.movies.current-films"
- "rec.food.recipes" "rec.humor")
- "*Groups that are part of the GroupLens experiment.")
-
-(defvar grouplens-prediction-display 'prediction-spot
- "valid values are:
- prediction-spot -- an * corresponding to the prediction between 1 and 5,
- confidence-interval -- a numeric confidence interval
- prediction-bar -- |##### | the longer the bar, the better the article,
- confidence-bar -- | ----- } the prediction is in the middle of the bar,
- confidence-spot -- ) * | the spot gets bigger with more confidence,
- prediction-num -- plain-old numeric value,
- confidence-plus-minus -- prediction +/i confidence")
-
-(defvar grouplens-score-offset 0
- "Offset the prediction by this value.
-Setting this variable to -2 would have the following effect on
-GroupLens scores:
-
- 1 --> -2
- 2 --> -1
- 3 --> 0
- 4 --> 1
- 5 --> 2
-
-The reason is that a user might want to do this is to combine
-GroupLens predictions with scores calculated by other score methods.")
-
-(defvar grouplens-score-scale-factor 1
- "This variable allows the user to magnify the effect of GroupLens scores.
-The scale factor is applied after the offset.")
-
-(defvar gnus-grouplens-override-scoring 'override
- "Tell GroupLens to override the normal Gnus scoring mechanism.
-GroupLens scores can be combined with gnus scores in one of three ways.
-'override -- just use grouplens predictions for grouplens groups
-'combine -- combine grouplens scores with gnus scores
-'separate -- treat grouplens scores completely separate from gnus")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Program global variables
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar grouplens-bbb-token nil
- "Current session token number.")
-
-(defvar grouplens-bbb-process nil
- "Process Id of current bbbd network stream process.")
-
-(defvar grouplens-bbb-buffer nil
- "Buffer associated with the BBBD process.")
-
-(defvar grouplens-rating-alist nil
- "Current set of message-id rating pairs.")
-
-(defvar grouplens-current-hashtable nil
- "A hashtable to hold predictions from the BBB.")
-
-(defvar grouplens-current-group nil)
-
-;;(defvar bbb-alist nil)
-
-(defvar bbb-timeout-secs 10
- "Number of seconds to wait for some response from the BBB.
-If this times out we give up and assume that something has died..." )
-
-(defvar grouplens-previous-article nil
- "Message-ID of the last article read.")
-
-(defvar bbb-read-point)
-(defvar bbb-response-point)
-
-(defun bbb-renew-hash-table ()
- (setq grouplens-current-hashtable (make-vector 100 0)))
-
-(bbb-renew-hash-table)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Utility Functions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun bbb-connect-to-bbbd (host port)
- (unless grouplens-bbb-buffer
- (setq grouplens-bbb-buffer
- (gnus-get-buffer-create (format " *BBBD trace: %s*" host)))
- (save-excursion
- (set-buffer grouplens-bbb-buffer)
- (make-local-variable 'bbb-read-point)
- (make-local-variable 'bbb-response-point)
- (setq bbb-read-point (point-min))))
-
- ;; if an old process is still running for some reason, kill it
- (when grouplens-bbb-process
- (ignore-errors
- (when (eq 'open (process-status grouplens-bbb-process))
- (set-process-buffer grouplens-bbb-process nil)
- (delete-process grouplens-bbb-process))))
-
- ;; clear the trace buffer of old output
- (save-excursion
- (set-buffer grouplens-bbb-buffer)
- (erase-buffer))
-
- ;; open the connection to the server
- (catch 'done
- (condition-case error
- (setq grouplens-bbb-process
- (open-network-stream-as-binary
- "BBBD" grouplens-bbb-buffer host port))
- (error (gnus-message 3 "Error: Failed to connect to BBB")
- nil))
- (and (null grouplens-bbb-process)
- (throw 'done nil))
- (save-excursion
- (set-buffer grouplens-bbb-buffer)
- (setq bbb-read-point (point-min))
- (or (bbb-read-response grouplens-bbb-process)
- (throw 'done nil))))
-
- ;; return the process
- grouplens-bbb-process)
-
-(defun bbb-send-command (process command)
- (goto-char (point-max))
- (insert command)
- (insert "\r\n")
- (setq bbb-read-point (point))
- (setq bbb-response-point (point))
- (set-marker (process-mark process) (point)) ; process output also comes here
- (process-send-string process command)
- (process-send-string process "\r\n")
- (process-send-eof process))
-
-(defun bbb-read-response (process)
- "This function eats the initial response of OK or ERROR from the BBB."
- (let ((case-fold-search nil)
- match-end)
- (goto-char bbb-read-point)
- (while (and (not (search-forward "\r\n" nil t))
- (accept-process-output process bbb-timeout-secs))
- (goto-char bbb-read-point))
- (setq match-end (point))
- (goto-char bbb-read-point)
- (setq bbb-read-point match-end)
- (looking-at "OK")))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Login Functions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun bbb-login ()
- "return the token number if login is successful, otherwise return nil."
- (interactive)
- (setq grouplens-bbb-token nil)
- (if (not (equal grouplens-pseudonym ""))
- (let ((bbb-process
- (bbb-connect-to-bbbd grouplens-bbb-host grouplens-bbb-port)))
- (if bbb-process
- (save-excursion
- (set-buffer (process-buffer bbb-process))
- (bbb-send-command bbb-process
- (concat "login " grouplens-pseudonym))
- (if (bbb-read-response bbb-process)
- (setq grouplens-bbb-token (bbb-extract-token-number))
- (gnus-message 3 "Error: GroupLens login failed")))))
- (gnus-message 3 "Error: you must set a pseudonym"))
- grouplens-bbb-token)
-
-(defun bbb-extract-token-number ()
- (let ((token-pos (search-forward "token=" nil t)))
- (when (looking-at "[0-9]+")
- (buffer-substring token-pos (match-end 0)))))
-
-(gnus-add-shutdown 'bbb-logout 'gnus)
-
-(defun bbb-logout ()
- "logout of bbb session."
- (when grouplens-bbb-token
- (let ((bbb-process
- (bbb-connect-to-bbbd grouplens-bbb-host grouplens-bbb-port)))
- (when bbb-process
- (save-excursion
- (set-buffer (process-buffer bbb-process))
- (bbb-send-command bbb-process (concat "logout " grouplens-bbb-token))
- (bbb-read-response bbb-process))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Get Predictions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun bbb-build-mid-scores-alist (groupname)
- "this function can be called as part of the function to return the list of score files to use.
-See the gnus variable `gnus-score-find-score-files-function'.
-
-*Note:* If you want to use grouplens scores along with calculated scores,
-you should see the offset and scale variables. At this point, I don't
-recommend using both scores and grouplens predictions together."
- (setq grouplens-current-group groupname)
- (when (member groupname grouplens-newsgroups)
- (setq grouplens-previous-article nil)
- ;; scores-alist should be a list of lists:
- ;; ((("message-id" ("<mid1>" score1 nil s) ("<mid2> score2 nil s))))
- ;;`((("message-id" . ,predict-list))) ; Yes, this is the return value
- (list
- (list
- (list (append (list "message-id")
- (bbb-get-predictions (bbb-get-all-mids) groupname)))))))
-
-(defun bbb-get-predictions (midlist groupname)
- "Ask the bbb for predictions, and build up the score alist."
- (gnus-message 5 "Fetching Predictions...")
- (if grouplens-bbb-token
- (let ((bbb-process (bbb-connect-to-bbbd grouplens-bbb-host
- grouplens-bbb-port)))
- (when bbb-process
- (save-excursion
- (set-buffer (process-buffer bbb-process))
- (bbb-send-command bbb-process
- (bbb-build-predict-command midlist groupname
- grouplens-bbb-token))
- (if (bbb-read-response bbb-process)
- (bbb-get-prediction-response bbb-process)
- (gnus-message 1 "Invalid Token, login and try again")
- (ding)))))
- (gnus-message 3 "Error: You are not logged in to a BBB")
- (ding)))
-
-(defun bbb-get-all-mids ()
- (mapcar (function (lambda (x) (mail-header-id x))) gnus-newsgroup-headers))
-
-(defun bbb-build-predict-command (mlist grpname token)
- (concat "getpredictions " token " " grpname "\r\n"
- (mapconcat 'identity mlist "\r\n") "\r\n.\r\n"))
-
-(defun bbb-get-prediction-response (process)
- (let ((case-fold-search nil))
- (goto-char bbb-read-point)
- (while (and (not (search-forward ".\r\n" nil t))
- (accept-process-output process bbb-timeout-secs))
- (goto-char bbb-read-point))
- (goto-char (+ bbb-response-point 4));; we ought to be right before OK
- (bbb-build-response-alist)))
-
-;; build-response-alist assumes that the cursor has been positioned at
-;; the first line of the list of mid/rating pairs.
-(defun bbb-build-response-alist ()
- (let (resp mid pred)
- (while
- (cond
- ((looking-at "\\(<.*>\\) :nopred=")
- ;;(push `(,(bbb-get-mid) ,gnus-summary-default-score nil s) resp)
- (forward-line 1)
- t)
- ((looking-at "\\(<.*>\\) :pred=\\([0-9]\.[0-9][0-9]\\) :conflow=\\([0-9]\.[0-9][0-9]\\) :confhigh=\\([0-9]\.[0-9][0-9]\\)")
- (setq mid (bbb-get-mid)
- pred (bbb-get-pred))
- (push `(,mid ,pred nil s) resp)
- (gnus-sethash mid (list pred (bbb-get-confl) (bbb-get-confh))
- grouplens-current-hashtable)
- (forward-line 1)
- t)
- ((looking-at "\\(<.*>\\) :pred=\\([0-9]\.[0-9][0-9]\\)")
- (setq mid (bbb-get-mid)
- pred (bbb-get-pred))
- (push `(,mid ,pred nil s) resp)
- (gnus-sethash mid (list pred 0 0) grouplens-current-hashtable)
- (forward-line 1)
- t)
- (t nil)))
- resp))
-
-;; these "get" functions assume that there is an active match lying
-;; around. Where the first parenthesized expression is the
-;; message-id, and the second is the prediction, the third and fourth
-;; are the confidence interval
-;;
-;; Since gnus assumes that scores are integer values?? we round the
-;; prediction.
-(defun bbb-get-mid ()
- (buffer-substring (match-beginning 1) (match-end 1)))
-
-(defun bbb-get-pred ()
- (let ((tpred (string-to-number (buffer-substring (match-beginning 2)
- (match-end 2)))))
- (if (> tpred 0)
- (round (* grouplens-score-scale-factor
- (+ grouplens-score-offset tpred)))
- 1)))
-
-(defun bbb-get-confl ()
- (string-to-number (buffer-substring (match-beginning 4) (match-end 4))))
-
-(defun bbb-get-confh ()
- (string-to-number (buffer-substring (match-beginning 4) (match-end 4))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Prediction Display
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defconst grplens-rating-range 4.0)
-(defconst grplens-maxrating 5)
-(defconst grplens-minrating 1)
-(defconst grplens-predstringsize 12)
-
-(defvar gnus-tmp-score)
-(defun bbb-grouplens-score (header)
- (if (eq gnus-grouplens-override-scoring 'separate)
- (bbb-grouplens-other-score header)
- (let* ((rate-string (make-string 12 ?\ ))
- (mid (mail-header-id header))
- (hashent (gnus-gethash mid grouplens-current-hashtable))
- (iscore gnus-tmp-score)
- (low (car (cdr hashent)))
- (high (car (cdr (cdr hashent)))))
- (aset rate-string 0 ?|)
- (aset rate-string 11 ?|)
- (unless (member grouplens-current-group grouplens-newsgroups)
- (unless (equal grouplens-prediction-display 'prediction-num)
- (cond ((< iscore 0)
- (setq iscore 1))
- ((> iscore 5)
- (setq iscore 5))))
- (setq low 0)
- (setq high 0))
- (if (and (bbb-valid-score iscore)
- (not (null mid)))
- (cond
- ;; prediction-spot
- ((equal grouplens-prediction-display 'prediction-spot)
- (setq rate-string (bbb-fmt-prediction-spot rate-string iscore)))
- ;; confidence-interval
- ((equal grouplens-prediction-display 'confidence-interval)
- (setq rate-string (bbb-fmt-confidence-interval iscore low high)))
- ;; prediction-bar
- ((equal grouplens-prediction-display 'prediction-bar)
- (setq rate-string (bbb-fmt-prediction-bar rate-string iscore)))
- ;; confidence-bar
- ((equal grouplens-prediction-display 'confidence-bar)
- (setq rate-string (format "| %4.2f |" iscore)))
- ;; confidence-spot
- ((equal grouplens-prediction-display 'confidence-spot)
- (setq rate-string (format "| %4.2f |" iscore)))
- ;; prediction-num
- ((equal grouplens-prediction-display 'prediction-num)
- (setq rate-string (bbb-fmt-prediction-num iscore)))
- ;; confidence-plus-minus
- ((equal grouplens-prediction-display 'confidence-plus-minus)
- (setq rate-string (bbb-fmt-confidence-plus-minus iscore low high))
- )
- (t (gnus-message 3 "Invalid prediction display type")))
- (aset rate-string 5 ?N) (aset rate-string 6 ?A))
- rate-string)))
-
-;; Gnus user format function that doesn't depend on
-;; bbb-build-mid-scores-alist being used as the score function, but is
-;; instead called from gnus-select-group-hook. -- LAB
-(defun bbb-grouplens-other-score (header)
- (if (not (member grouplens-current-group grouplens-newsgroups))
- ;; Return an empty string
- ""
- (let* ((rate-string (make-string 12 ?\ ))
- (mid (mail-header-id header))
- (hashent (gnus-gethash mid grouplens-current-hashtable))
- (pred (or (nth 0 hashent) 0))
- (low (nth 1 hashent))
- (high (nth 2 hashent)))
- ;; Init rate-string
- (aset rate-string 0 ?|)
- (aset rate-string 11 ?|)
- (unless (equal grouplens-prediction-display 'prediction-num)
- (cond ((< pred 0)
- (setq pred 1))
- ((> pred 5)
- (setq pred 5))))
- ;; If no entry in BBB hash mark rate string as NA and return
- (cond
- ((null hashent)
- (aset rate-string 5 ?N)
- (aset rate-string 6 ?A)
- rate-string)
-
- ((equal grouplens-prediction-display 'prediction-spot)
- (bbb-fmt-prediction-spot rate-string pred))
-
- ((equal grouplens-prediction-display 'confidence-interval)
- (bbb-fmt-confidence-interval pred low high))
-
- ((equal grouplens-prediction-display 'prediction-bar)
- (bbb-fmt-prediction-bar rate-string pred))
-
- ((equal grouplens-prediction-display 'confidence-bar)
- (format "| %4.2f |" pred))
-
- ((equal grouplens-prediction-display 'confidence-spot)
- (format "| %4.2f |" pred))
-
- ((equal grouplens-prediction-display 'prediction-num)
- (bbb-fmt-prediction-num pred))
-
- ((equal grouplens-prediction-display 'confidence-plus-minus)
- (bbb-fmt-confidence-plus-minus pred low high))
-
- (t
- (gnus-message 3 "Invalid prediction display type")
- (aset rate-string 0 ?|)
- (aset rate-string 11 ?|)
- rate-string)))))
-
-(defun bbb-valid-score (score)
- (or (equal grouplens-prediction-display 'prediction-num)
- (and (>= score grplens-minrating)
- (<= score grplens-maxrating))))
-
-(defun bbb-requires-confidence (format-type)
- (or (equal format-type 'confidence-plus-minus)
- (equal format-type 'confidence-spot)
- (equal format-type 'confidence-interval)))
-
-(defun bbb-have-confidence (clow chigh)
- (not (or (null clow)
- (null chigh))))
-
-(defun bbb-fmt-prediction-spot (rate-string score)
- (aset rate-string
- (round (* (/ (- score grplens-minrating) grplens-rating-range)
- (+ (- grplens-predstringsize 4) 1.49)))
- ?*)
- rate-string)
-
-(defun bbb-fmt-confidence-interval (score low high)
- (if (bbb-have-confidence low high)
- (format "|%4.2f-%4.2f |" low high)
- (bbb-fmt-prediction-num score)))
-
-(defun bbb-fmt-confidence-plus-minus (score low high)
- (if (bbb-have-confidence low high)
- (format "|%3.1f+/-%4.2f|" score (/ (- high low) 2.0))
- (bbb-fmt-prediction-num score)))
-
-(defun bbb-fmt-prediction-bar (rate-string score)
- (let* ((i 1)
- (step (/ grplens-rating-range (- grplens-predstringsize 4)))
- (half-step (/ step 2))
- (loc (- grplens-minrating half-step)))
- (while (< i (- grplens-predstringsize 2))
- (if (> score loc)
- (aset rate-string i ?#)
- (aset rate-string i ?\ ))
- (setq i (+ i 1))
- (setq loc (+ loc step)))
- )
- rate-string)
-
-(defun bbb-fmt-prediction-num (score)
- (format "| %4.2f |" score))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Put Ratings
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun bbb-put-ratings ()
- (if (and grouplens-bbb-token
- grouplens-rating-alist
- (member gnus-newsgroup-name grouplens-newsgroups))
- (let ((bbb-process (bbb-connect-to-bbbd grouplens-bbb-host
- grouplens-bbb-port))
- (rate-command (bbb-build-rate-command grouplens-rating-alist)))
- (if bbb-process
- (save-excursion
- (set-buffer (process-buffer bbb-process))
- (gnus-message 5 "Sending Ratings...")
- (bbb-send-command bbb-process rate-command)
- (if (bbb-read-response bbb-process)
- (setq grouplens-rating-alist nil)
- (gnus-message 1
- "Token timed out: call bbb-login and quit again")
- (ding))
- (gnus-message 5 "Sending Ratings...Done"))
- (gnus-message 3 "No BBB connection")))
- (setq grouplens-rating-alist nil)))
-
-(defun bbb-build-rate-command (rate-alist)
- (concat "putratings " grouplens-bbb-token " " grouplens-current-group " \r\n"
- (mapconcat (lambda (this) ; form (mid . (score . time))
- (concat (car this)
- " :rating=" (cadr this) ".00"
- " :time=" (cddr this)))
- rate-alist "\r\n")
- "\r\n.\r\n"))
-
-;; Interactive rating functions.
-(defun bbb-summary-rate-article (rating &optional midin)
- (interactive "nRating: ")
- (when (member gnus-newsgroup-name grouplens-newsgroups)
- (let ((mid (or midin (bbb-get-current-id))))
- (if (and rating
- (>= rating grplens-minrating)
- (<= rating grplens-maxrating)
- mid)
- (let ((oldrating (assoc mid grouplens-rating-alist)))
- (if oldrating
- (setcdr oldrating (cons rating 0))
- (push `(,mid . (,rating . 0)) grouplens-rating-alist))
- (gnus-summary-mark-article nil (int-to-string rating)))
- (gnus-message 3 "Invalid rating")))))
-
-(defun grouplens-next-unread-article (rating)
- "Select unread article after current one."
- (interactive "P")
- (when rating
- (bbb-summary-rate-article rating))
- (gnus-summary-next-unread-article))
-
-(defun grouplens-best-unread-article (rating)
- "Select unread article after current one."
- (interactive "P")
- (when rating
- (bbb-summary-rate-article rating))
- (gnus-summary-best-unread-article))
-
-(defun grouplens-summary-catchup-and-exit (rating)
- "Mark all articles not marked as unread in this newsgroup as read, then exit.
-If prefix argument ALL is non-nil, all articles are marked as read."
- (interactive "P")
- (when rating
- (bbb-summary-rate-article rating))
- (if (numberp rating)
- (gnus-summary-catchup-and-exit)
- (gnus-summary-catchup-and-exit rating)))
-
-(defun grouplens-score-thread (score)
- "Raise the score of the articles in the current thread with SCORE."
- (interactive "nRating: ")
- (let (e)
- (save-excursion
- (let ((articles (gnus-summary-articles-in-thread))
- article)
- (while (setq article (pop articles))
- (gnus-summary-goto-subject article)
- (bbb-summary-rate-article score
- (mail-header-id
- (gnus-summary-article-header article)))))
- (setq e (point)))
- (let ((gnus-summary-check-current t))
- (or (zerop (gnus-summary-next-subject 1 t))
- (goto-char e))))
- (gnus-summary-recenter)
- (gnus-summary-position-point)
- (gnus-set-mode-line 'summary))
-
-(defun bbb-exit-group ()
- (bbb-put-ratings)
- (bbb-renew-hash-table))
-
-(defun bbb-get-current-id ()
- (if gnus-current-headers
- (mail-header-id gnus-current-headers)
- (gnus-message 3 "You must select an article before you rate it")))
-
-(defun bbb-grouplens-group-p (group)
- "Say whether GROUP is a GroupLens group."
- (if (member group grouplens-newsgroups) " (GroupLens Enhanced)" ""))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; TIME SPENT READING
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar grouplens-current-starting-time nil)
-
-(defun grouplens-start-timer ()
- (setq grouplens-current-starting-time (current-time)))
-
-(defun grouplens-elapsed-time ()
- (let ((et (bbb-time-float (current-time))))
- (- et (bbb-time-float grouplens-current-starting-time))))
-
-(defun bbb-time-float (timeval)
- (+ (* (car timeval) 65536)
- (cadr timeval)))
-
-(defun grouplens-do-time ()
- (when (member gnus-newsgroup-name grouplens-newsgroups)
- (when grouplens-previous-article
- (let ((elapsed-time (grouplens-elapsed-time))
- (oldrating (assoc grouplens-previous-article
- grouplens-rating-alist)))
- (if (not oldrating)
- (push `(,grouplens-previous-article . (0 . ,elapsed-time))
- grouplens-rating-alist)
- (setcdr oldrating (cons (cadr oldrating) elapsed-time)))))
- (grouplens-start-timer)
- (setq grouplens-previous-article (bbb-get-current-id))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; BUG REPORTING
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defconst gnus-gl-version "gnus-gl.el 2.50")
-(defconst gnus-gl-maintainer-address "grouplens-bug@cs.umn.edu")
-(defun gnus-gl-submit-bug-report ()
- "Submit via mail a bug report on gnus-gl."
- (interactive)
- (require 'reporter)
- (reporter-submit-bug-report gnus-gl-maintainer-address
- (concat "gnus-gl.el " gnus-gl-version)
- (list 'grouplens-pseudonym
- 'grouplens-bbb-host
- 'grouplens-bbb-port
- 'grouplens-newsgroups
- 'grouplens-bbb-token
- 'grouplens-bbb-process
- 'grouplens-current-group
- 'grouplens-previous-article)
- nil
- 'gnus-gl-get-trace))
-
-(defun gnus-gl-get-trace ()
- "Insert the contents of the BBBD trace buffer."
- (when grouplens-bbb-buffer
- (insert-buffer-substring grouplens-bbb-buffer)))
-
-;;
-;; GroupLens minor mode
-;;
-
-(defvar gnus-grouplens-mode nil
- "Minor mode for providing a GroupLens interface in Gnus summary buffers.")
-
-(defvar gnus-grouplens-mode-map nil)
-
-(unless gnus-grouplens-mode-map
- (setq gnus-grouplens-mode-map (make-keymap))
- (gnus-define-keys
- gnus-grouplens-mode-map
- "n" grouplens-next-unread-article
- "r" bbb-summary-rate-article
- "k" grouplens-score-thread
- "c" grouplens-summary-catchup-and-exit
- "," grouplens-best-unread-article))
-
-(defun gnus-grouplens-make-menu-bar ()
- (unless (boundp 'gnus-grouplens-menu)
- (easy-menu-define
- gnus-grouplens-menu gnus-grouplens-mode-map ""
- '("GroupLens"
- ["Login" bbb-login t]
- ["Rate" bbb-summary-rate-article t]
- ["Next article" grouplens-next-unread-article t]
- ["Best article" grouplens-best-unread-article t]
- ["Raise thread" grouplens-score-thread t]
- ["Report bugs" gnus-gl-submit-bug-report t]))))
-
-(defun gnus-grouplens-mode (&optional arg)
- "Minor mode for providing a GroupLens interface in Gnus summary buffers."
- (interactive "P")
- (when (and (eq major-mode 'gnus-summary-mode)
- (member gnus-newsgroup-name grouplens-newsgroups))
- (make-local-variable 'gnus-grouplens-mode)
- (setq gnus-grouplens-mode
- (if (null arg) (not gnus-grouplens-mode)
- (> (prefix-numeric-value arg) 0)))
- (when gnus-grouplens-mode
- (gnus-make-local-hook 'gnus-select-article-hook)
- (add-hook 'gnus-select-article-hook 'grouplens-do-time nil 'local)
- (gnus-make-local-hook 'gnus-exit-group-hook)
- (add-hook 'gnus-exit-group-hook 'bbb-exit-group nil 'local)
- (make-local-variable 'gnus-score-find-score-files-function)
-
- (cond
- ((eq gnus-grouplens-override-scoring 'combine)
- ;; either add bbb-buld-mid-scores-alist to a list
- ;; or make a list
- (if (listp gnus-score-find-score-files-function)
- (setq gnus-score-find-score-files-function
- (append 'bbb-build-mid-scores-alist
- gnus-score-find-score-files-function))
- (setq gnus-score-find-score-files-function
- (list gnus-score-find-score-files-function
- 'bbb-build-mid-scores-alist))))
- ;; leave the gnus-score-find-score-files variable alone
- ((eq gnus-grouplens-override-scoring 'separate)
- (add-hook 'gnus-select-group-hook
- (lambda ()
- (bbb-get-predictions (bbb-get-all-mids)
- gnus-newsgroup-name))))
- ;; default is to override
- (t
- (setq gnus-score-find-score-files-function
- 'bbb-build-mid-scores-alist)))
-
- ;; Change how summary lines look
- (make-local-variable 'gnus-summary-line-format)
- (make-local-variable 'gnus-summary-line-format-spec)
- (setq gnus-summary-line-format gnus-summary-grouplens-line-format)
- (setq gnus-summary-line-format-spec nil)
- (gnus-update-format-specifications nil 'summary)
- (gnus-update-summary-mark-positions)
-
- ;; Set up the menu.
- (when (and menu-bar-mode
- (gnus-visual-p 'grouplens-menu 'menu))
- (gnus-grouplens-make-menu-bar))
- (add-minor-mode
- 'gnus-grouplens-mode " GroupLens" gnus-grouplens-mode-map)
- (gnus-run-hooks 'gnus-grouplens-mode-hook))))
-
-(provide 'gnus-gl)
-
-;;; gnus-gl.el ends here
* Global Score Files:: \e$BCO$r$D$+$_!"<*$r@Z$jNv$/%9%3%"%U%!%$%k\e(B
* Kill Files:: \e$B$=$l$i$O$^$@$3$3$K$"$k$,!"L5;k$9$k;v$,$G$-$k\e(B
* Converting Kill Files:: \e$B>C5n%U%!%$%k$r%9%3%"%U%!%$%k$KJQ49$9$k\e(B
-* GroupLens:: \e$B$I$l$rFI$`$N$,9%$-$+$NM=8@$rF@$k\e(B
* Advanced Scoring:: \e$B%9%3%"$NK!B'$r:n$k$?$a$KO@M}I=8=$r;H$&\e(B
* Score Decays:: \e$B%9%3%"$r8O$l$F$$$+$;$k$N$OLr$KN)$D;v$b$"$k\e(B
-GroupLens
-
-* Using GroupLens:: \e$B$I$N$h$&$K\e(B gnus \e$B$K\e(B GroupLens \e$B$r;H$o$;$k$h$&$K$9$k$+\e(B
-* Rating Articles:: GropLens \e$B$K$"$J$?$,$I$N$h$&$KCM$rIU$1$k$+$rCN$i$;$k\e(B
-* Displaying Predictions:: GropuLens \e$B$K$h$C$FM?$($i$l$?M=8@$rI=<($9$k\e(B
-* GroupLens Variables:: GoupLens \e$B$r%+%9%?%^%$%:$9$k\e(B
-
Advanced Scoring
* Advanced Scoring Syntax:: \e$BDj5A\e(B
* Global Score Files:: \e$BCO$r$D$+$_!"<*$r@Z$jNv$/%9%3%"%U%!%$%k\e(B
* Kill Files:: \e$B$=$l$i$O$^$@$3$3$K$"$k$,!"L5;k$9$k;v$,$G$-$k\e(B
* Converting Kill Files:: \e$B>C5n%U%!%$%k$r%9%3%"%U%!%$%k$KJQ49$9$k\e(B
-* GroupLens:: \e$B$I$l$rFI$`$N$,9%$-$+$NM=8@$rF@$k\e(B
* Advanced Scoring:: \e$B%9%3%"$NK!B'$r:n$k$?$a$KO@M}I=8=$r;H$&\e(B
* Score Decays:: \e$B%9%3%"$r8O$l$F$$$+$;$k$N$OLr$KN)$D;v$b$"$k\e(B
@end menu
\e$BJQ49$7$J$1$l$P$J$j$^$;$s!#$"$k$$$OC1$K$=$l$i$r!"$=$N$^$^$K$7$F$*$$$F$/$@\e(B
\e$B$5$$!#\e(BGnus \e$B$O0JA0F1MM$K$=$l$i$r;H$C$F$/$l$k$G$7$g$&!#\e(B
-@node GroupLens
-@section GroupLens
-@cindex GroupLens
-
-@sc{\e$BCm0U\e(B:} \e$B;DG0$J$3$H$K\e(B GroupLens \e$B5!9=$OJD:?$5$l$F$$$k$h$&$J$N$G!"$3$N9`\e(B
-\e$B$O<g$H$7$FNr;KE*$J6=<q$N$?$a$K=q$+$l$F$$$^$9!#\e(B
-
-@uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} \e$B$O!"KhF|:n@.\e(B
-\e$B$5$l$kB?$/$NNL$N%K%e!<%95-;v$+$i<A$NNI$$5-;v$rB>$N?M$H6&$K8+$D$1$k$N$r=u\e(B
-\e$B$1$k$?$a$N6&F1A*JL5!9=$G$9!#\e(B
-
-\e$B$3$l$rC#@.$9$k$?$a$K!"\e(BGroupLens \e$B5!9=$O$"$J$?$,4{$KFI$s$@5-;v$KBP$9$k0U8+\e(B
-\e$B$r!"F1$8$h$&$J;v$r$7$?B>$N?M$N0U8+$H7k9g$7$F!"$=$l$>$l$NL$FI%K%e!<%95-;v\e(B
-\e$B$K8D?M2=$5$l$?M=8@$rM?$($^$9!#\e(BGroupLens \e$B$rCg?M$N$h$&$J$b$N$@$H8+$J$7$F$/\e(B
-\e$B$@$5$$!#\e(BGroupLens \e$B$O$"$J$?$,$I$N$h$&$K5-;v$N2ACM$rIU$1$k$+$r8+$F!"F1$8$h\e(B
-\e$B$&$K5-;v$N2ACM$rIU$1$k?M$rC5$7$^$9!#0lEY$"$J$?$N0U8+$H0lCW$9$k?M$rH/8+$9\e(B
-\e$B$l$P!"M=8@$N7A$G!"$=$l$i$N?M$,5-;v$r$I$&;W$&$+$r$"$J$?$K9p$2$^$9!#$"$J$?\e(B
-\e$B$O$3$NM=8@$r5-;v$rFI$_$?$$$+$I$&$+$r7hDj$9$k$N$KLrN)$F$k;v$,$G$-$^$9!#\e(B
-
-@menu
-* Using GroupLens:: \e$B$I$N$h$&$K\e(B gnus \e$B$K\e(B GroupLens \e$B$r;H$o$;$k$h$&$K$9$k$+\e(B
-* Rating Articles:: GropLens \e$B$K$"$J$?$,$I$N$h$&$KCM$rIU$1$k$+$rCN$i$;$k\e(B
-* Displaying Predictions:: GropuLens \e$B$K$h$C$FM?$($i$l$?M=8@$rI=<($9$k\e(B
-* GroupLens Variables:: GoupLens \e$B$r%+%9%?%^%$%:$9$k\e(B
-@end menu
-
-@node Using GroupLens
-@subsection GroupLens \e$B$r;H$&\e(B
-
-GroupLens \e$B$r;H$&$?$a$K$O!"8=:_$A$^$?$KB8:_$9$kM#0l$N\e(B better bit \e$B$G$"\e(B
-\e$B$k\e(B @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
-Bureau (BBB)} \e$B$KI.L>\e(B (pseudonym) \e$B$rEPO?$7$J$1$l$P$J$j$^$;$s!#\e(B
-
-\e$BEPO?$7$?8e$G!"$$$/$D$+$NJQ?t$r@_Dj$9$kI,MW$,$"$j$^$9!#\e(B
-
-@table @code
-@item gnus-use-grouplens
-@vindex gnus-use-grouplens
-\e$B$3$NJQ?t$r\e(B @code{nil} \e$B$G$J$$CM$K@_Dj$9$k$H!"\e(BGnus \e$B$,A4$F$N\e(B GroupLens \e$B4XO"\e(B
-\e$B4X?t$r%U%C%/$9$k$h$&$K$J$j$^$9!#\e(B
-
-@item grouplens-pseudonym
-@vindex grouplens-pseudonym
-\e$B$3$NJQ?t$O\e(B Better Bit Bureau \e$B$KEPO?$7$?$H$-$K$b$i$C$?I.L>$K@_Dj$5$l$k$Y\e(B
-\e$B$-$G$9!#\e(B
-
-@item grouplens-newsgroups
-@vindex grouplens-newsgroups
-GroupLens \e$B$NM=8@$rF@$?$$$H;W$&%0%k!<%W$N%j%9%H$G$9!#\e(B
-@end table
-
-\e$B$3$l$,5/$->e$,$C$F\e(B GroupLens \e$B$r<B9T$9$k$?$a$KI,MW$J:GDc8B$N@_Dj$G$9!#0l\e(B
-\e$BEYEPO?$9$k$H!"\e(BGroupLens \e$B$O$"$J$?$KB>$N?M$,9M$($kJ?6Q$K4p$E$$$?%9%3%"$r$"\e(B
-\e$B$J$?$KDs6!$9$k$3$H$r;O$a$^$9!#$7$+$7!"\e(BGroupLens \e$B$NK\Ev$NMx1W$r<u$1$k$?$a\e(B
-\e$B$K$O!"<+J,<+?H$G5-;v$NCMIU$1$r;O$a$J$1$l$P$J$j$^$;$s!#$=$&$9$k$H!"\e(B
-GroupLens \e$B$,$"$J$?$KDs6!$9$k%9%3%"$O$"$J$?$,IaCJG<F@$9$k$h$&$J0U8+$r;}$C\e(B
-\e$B$??M$,4{$KCM$rIU$1$?4p$E$$$F8D?M2=$5$l$^$9!#\e(B
-
-@node Rating Articles
-@subsection Rating Articles
-
-GroupLens \e$B$G$O!"5-;v$O\e(B 1 \e$B$+$i\e(B 5 \e$B$^$G$G$=$l$r4^$s$@HO0O$GCM$rIU$1$i$l$^$9!#\e(B
-1 \e$B$OBS0h$NL5BL8/$$$N$h$&$J$b$N$@$H9M$($i$l!"\e(B5 \e$B$O5-;v$,K\Ev$KNI$$$H9M$($i\e(B
-\e$B$l$k$$$&;v$r0UL#$7$^$9!#$"$J$?$,<+J,<+?H$K?R$M$k4pK\E*$J<ALd$O!"\e(B
-``1 \e$B$+$i\e(B 5 \e$B$NHO0O$NCf$G!"$3$l$HF1$8$h$&$J5-;v$r$b$C$HFI$_$?$$$@$m$&\e(B
-\e$B$+\e(B?'' \e$B$G$9!#\e(B
-
-GroupLens \e$B$G!"5-;v$NCM$rEPO?$9$k$?$a$N;M$D$NJ}K!$,$"$j$^$9!#\e(B
-
-@table @kbd
-@item r
-@kindex r (GroupLens)
-@findex bbb-summary-rate-article
-\e$B$3$N4X?t$O\e(B 1 \e$B$+$i\e(B 5 \e$B$NHO0O$NCMIU$1$NF~NO$rB%?J$7$^$9!#\e(B
-
-@item k
-@kindex k (GroupLens)
-@findex grouplens-score-thread
-\e$B$3$N4X?t$OCMIU$1$NF~NO$rB%?J$7!"%9%l%C%I$NA4$F$N5-;v$rCMIU$1$^$9!#$3$l\e(B
-\e$B$O\e(B rec.humor \e$B$K$"$k$h$&$J$"$ND9$$4VB3$/%9%l%C%I$KBP$7$FHs>o$KLr$KN)$A$^\e(B
-\e$B$9!#\e(B
-@end table
-
-\e$B<!$NFs$D$NL?Na!"\e(B@kbd{n} \e$B$H\e(B @kbd{,} \e$B$O!"$"$J$?$,FI$s$G$$$k5-;v$N%9%3%"$K\e(B
-\e$B$J$k?tCM@\F,0z?t$r$H$j$^$9!#\e(B
-
-@table @kbd
-@item 1-5 n
-@kindex n (GroupLens)
-@findex grouplens-next-unread-article
-\e$B5-;v$NCM$rIU$1$F!"<!$NL$FI5-;v$K0\F0$7$^$9!#\e(B
-
-@item 1-5 ,
-@kindex , (GroupLens)
-@findex grouplens-best-unread-article
-\e$B5-;v$NCM$rIU$1$F<!$N0lHV9b$$%9%3%"$NL$FI5-;v$K0\F0$7$^$9!#\e(B
-@end table
-
-\e$B$b$78=:_$N5-;v$K%9%3%"\e(B 4 \e$B$rIU$1!"<!$N5-;v$K0\F0$7$?$$$N$G$"$l$P!"\e(B
-@kbd{4 n} \e$B$HC!$$$F$/$@$5$$!#\e(B
-
-@node Displaying Predictions
-@subsection \e$BM=8@I=<(\e(B
-
-GroupLens \e$B$O$"$J$?$,%K%e!<%95-;v$r$I$l$/$i$$5$$KF~$k$+$NM=8@$r$7$^$9!#\e(B
-GroupLens \e$B$+$i$NM=8@$O\e(B 1 \e$B$+$i\e(B 5 \e$B$NHO0O$K$"$j!"\e(B1 \e$B$,:G0-$G\e(B 5 \e$B$,:GNI$G$9!#\e(B
-GroupLens \e$B$+$i$NM=8@$rJQ?t\e(B @code{gnus-grouplens-override-scoring} \e$B$K$h$C\e(B
-\e$B$F@)8f$5$l$k;0$D$NFb$N0l$D$K$h$C$F;H$&;v$,$G$-$^$9!#\e(B
-
-@vindex gnus-grouplens-override-scoring
-grouplens \e$B$GM=8@$rI=<($9$k$?$a$K;0$D$NJ}K!$,$"$j$^$9!#\e(BGroupLens \e$B$N%9%3%"\e(B
-\e$B$rIaDL$N\e(B gnus \e$B%9%3%"5!9=$K9W8%$9$k$+!">e=q$-$9$k$+$rA*$V;v$,$G$-$^$9!#>e\e(B
-\e$B=q$-$,=i4|@_Dj$G$9!#$7$+$7!"\e(Bgnus \e$B$N%9%3%"$r\e(B grouplens \e$B$N%9%3%"$KB-$9$N$r\e(B
-\e$B9%$`?M$b$$$^$9!#J,N%%9%3%"$N?6$kIq$$$rF@$k$?$a$K$O!"\e(B
-@code{gnus-grouplens-override-scoring} \e$B$r\e(B @code{'separate} \e$B$K@_Dj$9$kI,\e(B
-\e$BMW$,$"$j$^$9!#\e(BGroupLens \e$B$NM=8@$H\e(B grouplens \e$B%9%3%"$r7k9g$9$k$?$a$K$O$=$l\e(B
-\e$B$r\e(B @code{'override} \e$B$K@_Dj$7!"%9%3%"$r7k9g$9$k$?$a$K\e(B
-\e$B$O\e(B @code{gnus-grouplens-override-scoring} \e$B$r\e(B @code{'combine} \e$B$K@_Dj$7$^\e(B
-\e$B$9!#7k9gIU2C5!G=$rMQ$$$k$H$-$O!"\e(B
-@code{grouplens-prediction-offset} \e$B$*$h\e(B
-\e$B$S\e(B @code{grouplens-score-scale-factor} \e$B$NCM$r@_Dj$7$?$$$H;W$&$G$7$g$&!#\e(B
-
-@vindex grouplens-prediction-display
-\e$B$I$A$i$N>l9g$G$b!"\e(BGroupLens \e$B$OFs!";0$NM=8@$,$I$N$h$&I=<($5$l$?$$$+$NA*Br\e(B
-\e$B$rM?$($^$9!#M=8@$NI=<($OJQ?t\e(B @code{grouplens-prediction-display} \e$B$K$h$C\e(B
-\e$B$F@)8f$5$l$^$9!#\e(B
-
-\e$B0J2<$N$b$N$,$=$NJQ?t$GM-8z$JCM$G$9!#\e(B
-
-@table @code
-@item prediction-spot
-\e$BM=8@$,9b$$$[$I!"1&$NJ}$K\e(B @samp{*} \e$B$,I=<($5$l$^$9!#\e(B
-
-@item confidence-interval
-\e$B?t;z$N3N?.\e(B (confidence) \e$B4V3V$G$9!#\e(B
-
-@item prediction-bar
-\e$BM=8@$,9b$$$[$I!"K@$,D9$/$J$j$^$9!#\e(B
-
-@item confidence-bar
-\e$B?t;z3N?.$G$9!#\e(B
-
-@item confidence-spot
-\e$B3N?.$,9b$$$[$IE@$,Bg$-$/$J$j$^$9!#\e(B
-
-@item prediction-num
-\e$BIaDL$N@N$J$,$i$N?tCM$G$9!#\e(B
-
-@item confidence-plus-minus
-\e$BM=8@$N\e(B +/- \e$B3N?.$G$9!#\e(B
-@end table
-
-@node GroupLens Variables
-@subsection GroupLens \e$BJQ?t\e(B
-
-@table @code
-@item gnus-summary-grouplens-line-format
-GropuLens \e$B3HD%$N35N,%P%C%U%!$G;H$o$l$k35N,9TMM<0$G$9!#IaDL$N35N,9TMM<0$,\e(B
-\e$B<u$1IU$1$k$b$N$HF1$8;XDj$r<u$1IU$1$^$9\e(B (@pxref{Summary Buffer Lines})\e$B!#\e(B
-\e$B=i4|@_Dj$O\e(B@samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%) %s\n} \e$B$G$9!#\e(B
-
-@item grouplens-bbb-host
-bbbd \e$B%5!<%P!<$,<B9T$5$l$F$$$k%[%9%H$G$9!#\e(B@samp{goruplens.cs.umn.edu} \e$B$,\e(B
-\e$B=i4|@_Dj$G$9!#\e(B
-
-@item grouplens-bbb-port
-bbbd \e$B%5!<%P!<$,<B9T$5$l$F$$$k%[%9%H$N%]!<%H$G$9!#=i4|CM$O\e(B 9000 \e$B$G$9!#\e(B
-
-@item grouplens-score-offset
-\e$BM=8@$+$i:9$70z$-$5$l$kCM$G$9!#$D$^$j!"0UL#$N$"$k%9%3%"$K$9$k$?$a$KM=8@$N\e(B
-\e$BCM$+$i$3$N?t;z$r0z$-;;$7$^$9!#=i4|CM$O\e(B 0 \e$B$G$9!#\e(B
-
-@item grouplens-score-scale-factor
-\e$BMxMQ<T$O$3$NJQ?t$r;H$C$F\e(B GroupLens \e$B$N%9%3%"$r3HBg$9$k;v$,$G$-$^$9!#3]$1\e(B
-\e$B;;$NMWAG$O:9$70z$-$N8e$KE,MQ$5$l$^$9!#=i4|CM$O\e(B 1 \e$B$G$9!#\e(B
-@end table
-
@node Advanced Scoring
@section \e$B>e5i%9%3%"IU$1\e(B
Kim-Minh Kaplan---picon \e$B%3!<%I$KCV$1$k99$J$k:n6H!#\e(B
@item
-Brad Miller---@file{gnus-gl.el} \e$B$H\e(B Grouplens \e$B$NItJ,$N%^%K%e%"\e(B
-\e$B%k\e(B (@pxref{GroupLens})\e$B!#\e(B
+Brad Miller---@file{gnus-gl.el} \e$B$H\e(B Grouplens \e$B$NItJ,$N%^%K%e%"%k!#\e(B
@item
Sudish Joseph---\e$B?t$(@Z$l$J$$$[$I$N%P%0$N=$@5!#\e(B
\e$B5-;v$,;2>H$5$l$?$H$-$K!"%9%l%C%I$NItJ,:n@.$,5/$3$k$h$&$K$J$j$^$7$?!#\e(B
@item
-Gnus \e$B$O\e(B GroupLens \e$B$NM=8@$r;H$&;v$,$G$-$k$h$&$K$J$j$^$7\e(B
-\e$B$?\e(B (@pxref{GroupLens})\e$B!#\e(B
+Gnus \e$B$O\e(B GroupLens \e$B$NM=8@$r;H$&;v$,$G$-$k$h$&$K$J$j$^$7$?!#\e(B
@item
Picons (personal icons) (\e$B8D?M%"%$%3%s\e(B) \e$B$,\e(B XEmacs \e$B$GI=<($G$-$k$h$&$K$J$j\e(B
* Global Score Files:: Earth-spanning, ear-splitting score files.
* Kill Files:: They are still here, but they can be ignored.
* Converting Kill Files:: Translating kill files to score files.
-* GroupLens:: Getting predictions on what you like to read.
* Advanced Scoring:: Using logical expressions to build score rules.
* Score Decays:: It can be useful to let scores wither away.
-GroupLens
-
-* Using GroupLens:: How to make Gnus use GroupLens.
-* Rating Articles:: Letting GroupLens know how you rate articles.
-* Displaying Predictions:: Displaying predictions given by GroupLens.
-* GroupLens Variables:: Customizing GroupLens.
-
Advanced Scoring
* Advanced Scoring Syntax:: A definition.
* Global Score Files:: Earth-spanning, ear-splitting score files.
* Kill Files:: They are still here, but they can be ignored.
* Converting Kill Files:: Translating kill files to score files.
-* GroupLens:: Getting predictions on what you like to read.
* Advanced Scoring:: Using logical expressions to build score rules.
* Score Decays:: It can be useful to let scores wither away.
@end menu
before.
-@node GroupLens
-@section GroupLens
-@cindex GroupLens
-
-@sc{Note:} Unfortunately the GroupLens system seems to have shut down,
-so this section is mostly of historical interest.
-
-@uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
-collaborative filtering system that helps you work together with other
-people to find the quality news articles out of the huge volume of
-news articles generated every day.
-
-To accomplish this the GroupLens system combines your opinions about
-articles you have already read with the opinions of others who have done
-likewise and gives you a personalized prediction for each unread news
-article. Think of GroupLens as a matchmaker. GroupLens watches how you
-rate articles, and finds other people that rate articles the same way.
-Once it has found some people you agree with it tells you, in the form
-of a prediction, what they thought of the article. You can use this
-prediction to help you decide whether or not you want to read the
-article.
-
-@menu
-* Using GroupLens:: How to make Gnus use GroupLens.
-* Rating Articles:: Letting GroupLens know how you rate articles.
-* Displaying Predictions:: Displaying predictions given by GroupLens.
-* GroupLens Variables:: Customizing GroupLens.
-@end menu
-
-
-@node Using GroupLens
-@subsection Using GroupLens
-
-To use GroupLens you must register a pseudonym with your local
-@uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
-Bureau (BBB)} is the only better bit in town at the moment.
-
-Once you have registered you'll need to set a couple of variables.
-
-@table @code
-
-@item gnus-use-grouplens
-@vindex gnus-use-grouplens
-Setting this variable to a non-@code{nil} value will make Gnus hook into
-all the relevant GroupLens functions.
-
-@item grouplens-pseudonym
-@vindex grouplens-pseudonym
-This variable should be set to the pseudonym you got when registering
-with the Better Bit Bureau.
-
-@item grouplens-newsgroups
-@vindex grouplens-newsgroups
-A list of groups that you want to get GroupLens predictions for.
-
-@end table
-
-That's the minimum of what you need to get up and running with GroupLens.
-Once you've registered, GroupLens will start giving you scores for
-articles based on the average of what other people think. But, to get
-the real benefit of GroupLens you need to start rating articles
-yourself. Then the scores GroupLens gives you will be personalized for
-you, based on how the people you usually agree with have already rated.
-
-
-@node Rating Articles
-@subsection Rating Articles
-
-In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
-Where 1 means something like this article is a waste of bandwidth and 5
-means that the article was really good. The basic question to ask
-yourself is, ``on a scale from 1 to 5 would I like to see more articles
-like this one?''
-
-There are four ways to enter a rating for an article in GroupLens.
-
-@table @kbd
-
-@item r
-@kindex r (GroupLens)
-@findex bbb-summary-rate-article
-This function will prompt you for a rating on a scale of one to five.
-
-@item k
-@kindex k (GroupLens)
-@findex grouplens-score-thread
-This function will prompt you for a rating, and rate all the articles in
-the thread. This is really useful for some of those long running giant
-threads in rec.humor.
-
-@end table
-
-The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
-the score of the article you're reading.
-
-@table @kbd
-
-@item 1-5 n
-@kindex n (GroupLens)
-@findex grouplens-next-unread-article
-Rate the article and go to the next unread article.
-
-@item 1-5 ,
-@kindex , (GroupLens)
-@findex grouplens-best-unread-article
-Rate the article and go to the next unread article with the highest score.
-
-@end table
-
-If you want to give the current article a score of 4 and then go to the
-next article, just type @kbd{4 n}.
-
-
-@node Displaying Predictions
-@subsection Displaying Predictions
-
-GroupLens makes a prediction for you about how much you will like a
-news article. The predictions from GroupLens are on a scale from 1 to
-5, where 1 is the worst and 5 is the best. You can use the predictions
-from GroupLens in one of three ways controlled by the variable
-@code{gnus-grouplens-override-scoring}.
-
-@vindex gnus-grouplens-override-scoring
-There are three ways to display predictions in grouplens. You may
-choose to have the GroupLens scores contribute to, or override the
-regular Gnus scoring mechanism. override is the default; however, some
-people prefer to see the Gnus scores plus the grouplens scores. To get
-the separate scoring behavior you need to set
-@code{gnus-grouplens-override-scoring} to @code{'separate}. To have the
-GroupLens predictions combined with the grouplens scores set it to
-@code{'override} and to combine the scores set
-@code{gnus-grouplens-override-scoring} to @code{'combine}. When you use
-the combine option you will also want to set the values for
-@code{grouplens-prediction-offset} and
-@code{grouplens-score-scale-factor}.
-
-@vindex grouplens-prediction-display
-In either case, GroupLens gives you a few choices for how you would like
-to see your predictions displayed. The display of predictions is
-controlled by the @code{grouplens-prediction-display} variable.
-
-The following are valid values for that variable.
-
-@table @code
-@item prediction-spot
-The higher the prediction, the further to the right an @samp{*} is
-displayed.
-
-@item confidence-interval
-A numeric confidence interval.
-
-@item prediction-bar
-The higher the prediction, the longer the bar.
-
-@item confidence-bar
-Numerical confidence.
-
-@item confidence-spot
-The spot gets bigger with more confidence.
-
-@item prediction-num
-Plain-old numeric value.
-
-@item confidence-plus-minus
-Prediction +/- confidence.
-
-@end table
-
-
-@node GroupLens Variables
-@subsection GroupLens Variables
-
-@table @code
-
-@item gnus-summary-grouplens-line-format
-The summary line format used in GroupLens-enhanced summary buffers. It
-accepts the same specs as the normal summary line format (@pxref{Summary
-Buffer Lines}). The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
-%s\n}.
-
-@item grouplens-bbb-host
-Host running the bbbd server. @samp{grouplens.cs.umn.edu} is the
-default.
-
-@item grouplens-bbb-port
-Port of the host running the bbbd server. The default is 9000.
-
-@item grouplens-score-offset
-Offset the prediction by this value. In other words, subtract the
-prediction value by this number to arrive at the effective score. The
-default is 0.
-
-@item grouplens-score-scale-factor
-This variable allows the user to magnify the effect of GroupLens scores.
-The scale factor is applied after the offset. The default is 1.
-
-@end table
-
-
@node Advanced Scoring
@section Advanced Scoring
Kim-Minh Kaplan---further work on the picon code.
@item
-Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
-(@pxref{GroupLens}).
+Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
@item
Sudish Joseph---innumerable bug fixes.
referred.
@item
-Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
+Gnus can make use of GroupLens predictions.
@item
Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).