slrn: FAQ on scoring
This document is based on one found in the slrn distribution; see the credits section at the bottom of this page.
The purpose of this FAQ is to provide answers for commonly asked questions about slrn score files. Some of the questions are based on a similar FAQ for the rn newsreader. For more general information on scoring, see the slrn scoring document.
In order for slrn to read a score file, it must know the name of the score file. This is specified by putting the appropriate line in your .slrnrc file. For example, if the name of the score file is `Score' and it is located in the News subdirectory, then add the line:
Note: this is set up automatically for most Alcor users.
The format is simple. It consists sections that scores that are to be applied to one or more newsgroups. Each section must start with a line that contains the name of the newsgroup, enclosed in square brackets, for which the scores defined by that section apply.
For example, a line of the form:
Individual scores of a section start with the `Score' keyword. It indicates how many points are to be awarded to the article if it passes the test defined by the score. For example,
It is also possible to score an article based on more than one header. For example,
A score of -9999 is a special score. If an article scores this value on a given test, any other tests for the article will be skipped and the article will be killed.
If the first character of a score is `=', the article will given the score and the rest of the tests will be skipped. For example,
The `~' character may used used as a NOT operator. For example, the previous score can (almost) be written:
This simply says to kill any article that was cross posted to an astrology group UNLESS the author is from space.mit.edu.
Finally the ``Score'' keyword can be followed by 2 colons to indicate that any the score is awarded to the article if any of the tests defined by the score are passed. For example,
assigns a score of 1000 to an article if its subject line contains either neutrino or fermion.
Assume a followup either contains a subject starting with `Re:' or has a references header. To assign a score of -9999 to such an article use:
Note the use of the double colon following the score keyword. This indicates that the score is an OR type expression. This means that the above score will pick out articles with EITHER subjects that begin with `Re:' OR have a references line.
To score articles with BOTH subjects with `Re:' AND a references headers, use the single colon form:
Single colon forms are AND expressions.
You have two choices: either use the `Xref' header or the `Newsgroups' header. It is best to avoid the `Newsgroups' header if possible, that is, try to use the Xref header.
Assume that you want to score any article that was cross-posted to an ``astrology'' newsgroup. Then use one of the following forms:
Again, try to avoid using the last form if possible.
Like the previous answer you have two choices: to use the Xref header (preferred) or the Newsgroups header. The first choice uses the fact that a cross-posted article will have two colons in the Xref header field. So, use a score of the form:
If you do not have the option of using the Xref header, use:
The answer is simple: kill posts by everyone else. Assume that you want to only read posts by someone whose from line contains: someone@i.like. Then use a score of the form:
Note the use of the NOT indicator (~).
Define a score based on the references header and the subject headers, e.g.,
Here the the references line simply says that the article must NOT have a references header. The subject header uses a regular expressions that says ``Re:'' must occur at the beginning of the subject. This will match the strings "Re:", "re:", "rE:", and "RE:". To match only "Re:", use the regular expression
Here \c turns on case-sensitivity. To turn it off, use \C.
Use something like:
This will assign a score of -9999 to any article whose subject header does NOT contain a lowercase character. To also kill followups to such articles use:
The last one says that the article will be killed if the subject satisfies the two conditions:
The last constraint is necessary to avoid killing articles that are followups to articles with an empty subject line. Of course, one might want to kill such articles as well.
|
Copyright, © 2003,
Concordia University,
(IITS).
|
|
|