• [slrn[ score question

    From Lewis@21:1/5 to All on Fri Dec 3 18:53:25 2021
    It's been a long time since I first setup my slrn scroe file, and when
    looking through it today I came across this and realized I don't
    remember what it manes anymore, though it seemed important at the time
    as it it near the top of the score file.

    Score:: -800
    ~Subject: \c[a-z]
    {:
    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]
    }

    Heck I can't even remember how Score:: is different from Score::

    --
    S is for SUSAN who perished of fits
    T is for TITUS who flew into bits

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Funk@21:1/5 to Lewis on Sat Dec 4 13:21:32 2021
    On 2021-12-03, Lewis wrote:

    It's been a long time since I first setup my slrn scroe file, and when looking through it today I came across this and realized I don't
    remember what it manes anymore, though it seemed important at the time
    as it it near the top of the score file.

    Score:: -800
    ~Subject: \c[a-z]
    {:
    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]
    }

    Heck I can't even remember how Score:: is different from Score::

    'Score:' is an AND (the rule fires if all the conditions are met);
    'Score::' is an OR (the rule fires if any condition is met).

    And you can nest the boolean operators with the brackets. Here's a
    weird example I found in my score file:

    Score: 45
    {::
    Subject: chemical
    Subject: chemistry
    Subject: lab
    }
    {::
    Subject: supplier
    Subject: supplies
    Subject: supply
    }

    That will match any post whose Subject contains one or more word from
    each list (in any order).

    I don't remember what the \c in your example does, but I'm curious!


    --
    While outside on the turnpike
    They got this new hit tune
    Thrills become as cheap as gas
    And gas as cheap as thrills

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lewis@21:1/5 to Adam Funk on Sat Dec 4 14:13:30 2021
    In message <sj6s7ix9at.ln2@news.ducksburg.com> Adam Funk <a24061@ducksburg.com> wrote:
    On 2021-12-03, Lewis wrote:

    It's been a long time since I first setup my slrn scroe file, and when
    looking through it today I came across this and realized I don't
    remember what it manes anymore, though it seemed important at the time
    as it it near the top of the score file.

    Score:: -800
    ~Subject: \c[a-z]
    {:
    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]
    }

    Heck I can't even remember how Score:: is different from Score::

    'Score:' is an AND (the rule fires if all the conditions are met);
    'Score::' is an OR (the rule fires if any condition is met).

    I thought the : and :: applied to subclauses like in your example. I
    just didn't remember you could do it on the Score line. I usually
    manually create

    Score: #
    {::
    list of or matches
    }

    And you can nest the boolean operators with the brackets. Here's a
    weird example I found in my score file:

    Score: 45
    {::
    Subject: chemical
    Subject: chemistry
    Subject: lab
    }
    {::
    Subject: supplier
    Subject: supplies
    Subject: supply
    }

    That will match any post whose Subject contains one or more word from
    each list (in any order).

    I don't remember what the \c in your example does, but I'm curious!

    Me too!

    --
    Si Hoc Legere Scis Nimium Eruditionis Habes

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tavis Ormandy@21:1/5 to Lewis on Sat Dec 4 15:31:29 2021
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    {:

    This starts a group, all of the rules in the group have to match.

    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]

    This is adding an exception for Re:, so Re: ALL CAPS still matches the
    rule!

    }

    You can also add a comment, like Score: -100 % All CAPS, then when you
    show the score view (v), it tells you which scores matched! This is
    really handy if you have a bunch of complicated rules and not sure what
    caused a score to be so high/low.

    Tavis.

    --
    _o) $ lynx lock.cmpxchg8b.com
    /\\ _o) _o) $ finger taviso@sdf.org
    _\_V _( ) _( ) @taviso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter J Ross@21:1/5 to Lewis on Sat Dec 4 17:16:58 2021
    On 2021-12-03, Lewis <g.kreme@kreme.dont-email.me> wrote:
    It's been a long time since I first setup my slrn scroe file, and when looking through it today I came across this and realized I don't
    remember what it manes anymore, though it seemed important at the time
    as it it near the top of the score file.

    Perhaps it's near the top because you added it early and then forgot
    about it. :-)

    Score:: -800
    ~Subject: \c[a-z]
    {:
    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]
    }

    You adapted this from an example in the official documentation.

    https://slrn.info/docs/score.txt

    #v+
    For writing even more complex entries, slrn now allows the grouping of
    scorefile rules. Here is a simple example:

    Score:: -1000
    ~Subject: \c[a-z]
    {:
    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]
    }

    Lines enclosed in curly braces are grouped; the initial brace is
    followed by one or two colons that indicate whether only one (`::') or
    all of the lines (`:') inside the group need to match for the group to
    pass.

    As the result, the example kills subject header lines that do not
    contain lowercase characters, not counting an initial `Re:'.
    #v-

    Heck I can't even remember how Score:: is different from Score::

    I bet my memory of the subtleties of slrn is worse than yours.



    --
    PJR :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Funk@21:1/5 to Tavis Ormandy on Sat Dec 4 19:23:25 2021
    On 2021-12-04, Tavis Ormandy wrote:

    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    {:

    This starts a group, all of the rules in the group have to match.

    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]

    This is adding an exception for Re:, so Re: ALL CAPS still matches the
    rule!

    I must be missing something --- I thought scoring patterns were case-insensitive by default?



    }

    You can also add a comment, like Score: -100 % All CAPS, then when you
    show the score view (v), it tells you which scores matched! This is
    really handy if you have a bunch of complicated rules and not sure what caused a score to be so high/low.

    Tavis.



    --
    books by the blameless and by the dead

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Funk@21:1/5 to Lewis on Sat Dec 4 19:21:52 2021
    On 2021-12-04, Lewis wrote:

    In message <sj6s7ix9at.ln2@news.ducksburg.com> Adam Funk <a24061@ducksburg.com> wrote:
    On 2021-12-03, Lewis wrote:

    It's been a long time since I first setup my slrn scroe file, and when
    looking through it today I came across this and realized I don't
    remember what it manes anymore, though it seemed important at the time
    as it it near the top of the score file.

    Score:: -800
    ~Subject: \c[a-z]
    {:
    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]
    }

    Heck I can't even remember how Score:: is different from Score::

    'Score:' is an AND (the rule fires if all the conditions are met);
    'Score::' is an OR (the rule fires if any condition is met).

    I thought the : and :: applied to subclauses like in your example. I
    just didn't remember you could do it on the Score line. I usually
    manually create

    I know Score:: is OR because I have rules that work, e.g.,

    Score:: +10
    From: alice@example.com
    From: bob@example.org



    Score: #
    {::
    list of or matches
    }

    And you can nest the boolean operators with the brackets. Here's a
    weird example I found in my score file:

    Score: 45
    {::
    Subject: chemical
    Subject: chemistry
    Subject: lab
    }
    {::
    Subject: supplier
    Subject: supplies
    Subject: supply
    }

    That will match any post whose Subject contains one or more word from
    each list (in any order).

    I don't remember what the \c in your example does, but I'm curious!

    Me too!

    Well, let me know if you find out!


    --
    is it any wonder that my mind's on fire,
    imprisoned by the thoughts of what to do?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tavis Ormandy@21:1/5 to Adam Funk on Sat Dec 4 21:34:35 2021
    On 2021-12-04, Adam Funk wrote:
    On 2021-12-04, Tavis Ormandy wrote:

    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.


    I must be missing something --- I thought scoring patterns were case-insensitive by default?

    You're not missing anything, exactly right! They're case-insensitive by default, but \c enables case-sensitivity. So \c[a-z] only matches
    lowercase, but the rule is inverted (the tilde) - so it only matches
    *no* lowercase.

    Tavis.

    --
    _o) $ lynx lock.cmpxchg8b.com
    /\\ _o) _o) $ finger taviso@sdf.org
    _\_V _( ) _( ) @taviso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lewis@21:1/5 to Tavis Ormandy on Sun Dec 5 05:23:42 2021
    In message <j11fuhF6qfdU1@mid.individual.net> Tavis Ormandy <taviso@gmail.com> wrote:
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    Ah, that makes sense I knew that once.`

    You can also add a comment, like Score: -100 % All CAPS

    Yes, I gave done that on many newer rules, but not on some of the
    originals (I may not have known about commenting back then and didn't go
    back and do it when I should have).

    Thanks for the explanation.

    --
    Bart, don't use the Touch of Death on your sister.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Funk@21:1/5 to Lewis on Sun Dec 5 15:32:26 2021
    On 2021-12-05, Lewis wrote:

    In message <j11fuhF6qfdU1@mid.individual.net> Tavis Ormandy <taviso@gmail.com> wrote:
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    Ah, that makes sense I knew that once.`

    You can also add a comment, like Score: -100 % All CAPS

    Yes, I gave done that on many newer rules, but not on some of the
    originals (I may not have known about commenting back then and didn't go
    back and do it when I should have).

    It's just like putting comments in programs --- by the time you
    realize you need them to figure out what you meant, it's too late.



    Thanks for the explanation.


    --
    Our scientific power has outrun our spiritual power. We have guided
    missiles and misguided men. ---Martin Luther King, Jr.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Funk@21:1/5 to Tavis Ormandy on Sun Dec 5 15:31:40 2021
    On 2021-12-04, Tavis Ormandy wrote:

    On 2021-12-04, Adam Funk wrote:
    On 2021-12-04, Tavis Ormandy wrote:

    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.


    I must be missing something --- I thought scoring patterns were
    case-insensitive by default?

    You're not missing anything,

    Well actually...

    exactly right! They're case-insensitive by
    default, but \c enables case-sensitivity. So \c[a-z] only matches
    lowercase, but the rule is inverted (the tilde) - so it only matches
    *no* lowercase.

    ...I forgot about the ~ NOT. Now I understand, thanks.


    --
    Master Foo once said to a visiting programmer: "There is more
    Unix-nature in one line of shell script than there is in ten
    thousand lines of C." ---Eric Raymond

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lewis@21:1/5 to Adam Funk on Sun Dec 5 23:24:07 2021
    In message <al2v7ix434.ln2@news.ducksburg.com> Adam Funk <a24061@ducksburg.com> wrote:
    On 2021-12-05, Lewis wrote:

    In message <j11fuhF6qfdU1@mid.individual.net> Tavis Ormandy <taviso@gmail.com> wrote:
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    Ah, that makes sense I knew that once.`

    You can also add a comment, like Score: -100 % All CAPS

    Yes, I gave done that on many newer rules, but not on some of the
    originals (I may not have known about commenting back then and didn't go
    back and do it when I should have).

    It's just like putting comments in programs --- by the time you
    realize you need them to figure out what you meant, it's too late.

    Nah, as it turns out they are better because the comments are shown when
    you look at the score details while in slrn.

    --
    "Are you pondering what I'm pondering?"
    "Uh, I think so Brain, but this time, you wear the tutu."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremy Brubaker@21:1/5 to Tavis Ormandy on Thu Dec 9 18:55:42 2021
    On 2021-12-04, Tavis Ormandy wrote:
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    Why can't the first line be Subject: \c[A-Z] instead? And doesn't that
    only match one-word subjects? I've been trying to figure out how to kill all-caps From: and Subject: and I'm not sure I have it correct.

    {:

    This starts a group, all of the rules in the group have to match.

    Subject: ^Re:
    ~Subject: ^Re:.*\c[a-z]

    This is adding an exception for Re:, so Re: ALL CAPS still matches the

    And why can't this just be Subject: ^Re:.*\c[A-Z]? (with the appropriate altering of the AND/OR blocks)

    Clearly regex are not my strong suit.


    --
    () www.asciiribbon.org | Jeremy Brubaker
    /\ - against html mail | јЬruЬаkе@оrіоnаrtѕ.іо / neonrex on IRC

    "Humor is a drug which it's the fashion to abuse." -- William Gilbert

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tavis Ormandy@21:1/5 to Jeremy Brubaker on Fri Dec 10 06:37:22 2021
    On 2021-12-09, Jeremy Brubaker wrote:
    On 2021-12-04, Tavis Ormandy wrote:
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    Why can't the first line be Subject: \c[A-Z] instead?

    That would match any subject with a capital letter (rather than any
    subject *without* a lowercase letter).

    You're probably thinking of something like \c^[A-Z]+$ (nothing but
    capital letters)... It works, but then a space or punctuation "OH
    YEAH!!!!" gets through... so "no lowercase" is just a less messy
    way of saying "only uppercase or punctuation or spaces or symbols or
    ..." :)

    Tavis.

    --
    _o) $ lynx lock.cmpxchg8b.com
    /\\ _o) _o) $ finger taviso@sdf.org
    _\_V _( ) _( ) @taviso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremy Brubaker@21:1/5 to Tavis Ormandy on Fri Dec 10 21:17:00 2021
    On 2021-12-10, Tavis Ormandy wrote:
    On 2021-12-09, Jeremy Brubaker wrote:
    On 2021-12-04, Tavis Ormandy wrote:
    On 2021-12-03, Lewis wrote:
    ~Subject: \c[a-z]

    The tilde means the rule is inverted and \c means to enable case
    sensitivity, so this only matches if the subject was ALL CAPS.

    Why can't the first line be Subject: \c[A-Z] instead?

    That would match any subject with a capital letter (rather than any
    subject *without* a lowercase letter).

    Oh yeah. Thanks for pointing that out.

    --
    () www.asciiribbon.org | Jeremy Brubaker
    /\ - against html mail | јЬruЬаkе@оrіоnаrtѕ.іо / neonrex on IRC

    I just thought of something funny...your mother. -- Cheech Marin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)