Next: Advanced Scoring Tips, Previous: Advanced Scoring Syntax, Up: Advanced Scoring [Contents][Index]

#### 7.15.2 Advanced Scoring Examples

Please note that the following examples are score file rules. To make a complete score file from them, surround them with another pair of parentheses.

Let’s say you want to increase the score of articles written by Lars when he’s talking about Gnus:

    ((&
      ("from" "Lars Ingebrigtsen")
      ("subject" "Gnus"))
     1000)

Quite simple, huh?

When he writes long articles, he sometimes has something nice to say:

    ((&
      ("from" "Lars Ingebrigtsen")
      (|
       ("subject" "Gnus")
       ("lines" 100 >)))
     1000)

However, when he responds to things written by Reig Eigil Logge, you really don’t want to read what he’s written:

    ((&
      ("from" "Lars Ingebrigtsen")
      (1- ("from" "Reig Eigil Logge")))
     -100000)

Everybody that follows up Redmondo when he writes about disappearing socks should have their scores raised, but only when they talk about white socks. However, when Lars talks about socks, it’s usually not very interesting:

    ((&
      (1-
       (&
        ("from" "redmondo@.*no" r)
        ("body" "disappearing.*socks" t)))
      (! ("from" "Lars Ingebrigtsen"))
      ("body" "white.*socks"))
     1000)

Suppose you’re reading a high volume group and you’re only interested in replies. The plan is to score down all articles that don’t have subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all parents of articles that have subjects that begin with reply marks.

    ((! ("subject" "re:\\|fwd?:" r))
      -200)
    ((1- ("subject" "re:\\|fwd?:" r))
      200)

The possibilities are endless.