Thread View: news.software.readers
7 messages
7 total messages
Started by teasmoke
Sat, 11 Dec 1999 00:00
slrn: scoring challenge
Author: teasmoke
Date: Sat, 11 Dec 1999 00:00
Date: Sat, 11 Dec 1999 00:00
76 lines
2564 bytes
2564 bytes
Here's what I've been fighting my scorefile for:
A scorefile entr(y|ies) which will score replies to articles I've posted,
based on how many posts there have been in the thread since mine.
So, frex, an article with
References: <me!> <123@foo> <456@bar>
would score 6000, whereas
References: <me!> <789@baz>
would score 7000, and
References: <me!> <123@foo> <456@bar> <789@baz>
would score 5000. And so on.
What I've been using in my scorefile for this is
Score: 9000
Message-id <.*gn08251.*>
Score: 8000
References: <.*gn08251.*>[^<>]*
Score: -1000
References: <.*gn08251.*> *<.*>[^<>]*
Score: -1000
References: <.*gn08251.*> *<.*> *<.*>[^<>]*
Score: -1000
References: <.*gn08251.*> *<.*> *<.*> *<.*>[^<>]*
Score: -1000
References: <.*gn08251.*> *<.*> *<.*> *<.*> *<.*>[^<>]*
Score: -1000
References: <.*gn08251.*> *<.*> *<.*> *<.*> *<.*> *<.*>[^<>]*
(etc.)
This almost works. The only problem with this is, it matches
References: <me!> <123@foo> <me!> <456@bar> <789@baz>
just the same as
References: <000@qux> <123@foo> <me!> <456@bar> <789@baz>
. As a result, extended discussions with me end up being scored the same as
a thread where my post has long since been left in the dust. Which is *not*
what I'm looking for.
I need a pattern which will give me the equivelant of
Score: -1000
References: <me!> <NOTme!>
. I've been dueling with my scorefile for a long time now, trying to come up
with a recipe that will produce that effect, but to no avail.
Does anyone know of a slrn or regex trick that I could put to use here?
Served with a smile,
--
Kerne
Re: slrn: scoring challenge
Author: Heikki Kantola
Date: Sat, 11 Dec 1999 00:00
Date: Sat, 11 Dec 1999 00:00
54 lines
2833 bytes
2833 bytes
teasmoke <gn08251@news.giganews.com> informed
news.software.readers with the following:
>This almost works. The only problem with this is, it matches
>
> References: <me!> <123@foo> <me!> <456@bar> <789@baz>
>
>just the same as
>
> References: <000@qux> <123@foo> <me!> <456@bar> <789@baz>
>
>. As a result, extended discussions with me end up being scored the same as
>a thread where my post has long since been left in the dust. Which is *not*
>what I'm looking for.
>
>I need a pattern which will give me the equivelant of
>
>Score: -1000
>References: <me!> <NOTme!>
>
>. I've been dueling with my scorefile for a long time now, trying to come up
>with a recipe that will produce that effect, but to no avail.
The trick is to anchor the message-id list to end of line with '$',
otherwise it can still match lines with anything after the matching
part of your regexp.
>Does anyone know of a slrn or regex trick that I could put to use here?
So, you should something this:
Score:: =9000
References: hezu@.*\.Helsinki.FI>$
Score: 5000
References: <[^>]+hezu@.*\.Helsinki\.FI>[ \t\n]+<[^>]+>$
Score: 2500
References: <[^>]+hezu@.*\.Helsinki\.FI>[ \t\n]+<[^>]+>[ \t\n]+\
<[^>]+>$
Score: 500
References: <[^>]+hezu@.*\.Helsinki\.FI>[ \t\n]+<[^>]+>[ \t\n]+\
<[^>]+>[ \t\n]+<[^>]+>$
It is still possible that the above rules match articles deeper in the
thread as some newsreaders wrap long References:-line into multiple
lines and Msg-id of your article can be near of end of line again and
I can't think of any easy way to determine which line is the last one
with Slrn's score mechanism.
--
Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI>
L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Re: slrn: scoring challenge
Author: teasmoke
Date: Sat, 11 Dec 1999 00:00
Date: Sat, 11 Dec 1999 00:00
86 lines
3966 bytes
3966 bytes
Still, questions about Heikki Kantola's hands, which might one day hold *my* Myst book, are unsettling to me: > teasmoke <gn08251@news.giganews.com> informed news.software.readers with the > following: > > >This almost works. The only problem with this is, it matches > > > > References: <me!> <123@foo> <me!> <456@bar> <789@baz> > > > >just the same as > > > > References: <000@qux> <123@foo> <me!> <456@bar> <789@baz> > > > >. As a result, extended discussions with me end up being scored the same as > >a thread where my post has long since been left in the dust. Which is *not* > >what I'm looking for. > > > >I need a pattern which will give me the equivelant of > > > >Score: -1000 References: <me!> <NOTme!> > > > >. I've been dueling with my scorefile for a long time now, trying to come > >up with a recipe that will produce that effect, but to no avail. > > The trick is to anchor the message-id list to end of line with '$', > otherwise it can still match lines with anything after the matching part of > your regexp. < nods > I'd been using [^<>]* for that, for some reason. I think I'd the notion that $ wouldn't work reliably with newsreaders which stuck unaccountable amounts of whitespace between message-ids in the references header. > >Does anyone know of a slrn or regex trick that I could put to use here? > > So, you should something this: > # Score:: =9000 # References: hezu@.*\.Helsinki.FI>$ # Score: 5000 # References: <[^>]+hezu@.*\.Helsinki\.FI>[ \t\n]+<[^>]+>$ # Score: 2500 # References: <[^>]+hezu@.*\.Helsinki\.FI>[ \t\n]+<[^>]+>[ \t\n]+\ # <[^>]+>$ # Score: 500 # References: <[^>]+hezu@.*\.Helsinki\.FI>[ \t\n]+<[^>]+>[ \t\n]+\ # <[^>]+>[ \t\n]+<[^>]+>$ Wow. Thank you. Very much. I must admit, I don't understand how that works, (how <[^>]+> avoids matching <.*gn08251@erudite.localdomain>) but it does. I plugged that into my scorefile (changing it for gn08251@erudite.localdomain, of course), and grabbed the last 2000 articles from /var/spool/news , and they were scored correctly. Excellent. The only problem with it, actually, is that I have to set the scores with an = to avoid scores in the 10000s for references headers containing my ids more than once. Which is okay, but it wipes out the scoring I have set up for line count and significance of poster. Is there a Score: operator to skip the *remaining* tests? > It is still possible that the above rules match articles deeper in the > thread as some newsreaders wrap long References:-line into multiple lines > and Msg-id of your article can be near of end of line again and I can't > think of any easy way to determine which line is the last one with Slrn's > score mechanism. < nods > I'm not sure that's a serious consideration; even if it is, that's a better bug than the multiple-my-ids bug I'd been working with. Thank you. Served with a smile, -- Kerne
Re: slrn: scoring challenge - scoring direct and indirect followups accordingly
Author: teasmoke
Date: Mon, 13 Dec 1999 00:00
Date: Mon, 13 Dec 1999 00:00
68 lines
3612 bytes
3612 bytes
Still, questions about Sven Guckes' hands, which might one day hold *my* Myst book, are unsettling to me: > * teasmoke <gn08251@news.giganews.com>: > > > Of course, <[^>]+> actually doesn't avoid matching my IDs (which is what > > I'd mistakenly thought), it's just that the recipe she provided is happy > > to match References: <me> <123@foo> <456@bar> in *addition* to References: > > <me> <789@baz> <me> > > [groups] Score: References: <me>$ Yes, I know. I've got that in for direct replies. (Sorry. Bad example.) What I'm working towards is graduated scoring for posts in threads in which I've participated, scored based on how far back the first instance of one of my message-ids is in the references header of the scored article. Because, the farther back my reply is in the given thread, the less likely it is that I will want to read or respond to the post. The recipes from my scorefile that I made with her pattern are: # Score: 9000 # Message-Id: gn08251@erudite\.localdomain # Score: 8000 # References: gn08251@erudite\.localdomain>$ # Score: 7000 # References: <[^>]+gn08251@erudite\.localdomain>[ \t\n]+<[^>]+>$ # Score: 6000 # References: <[^>]+gn08251@erudite\.localdomain>[ \t\n]+<[^>]+>[\ # \t\n]+<[^>]+>$ # Score: 5000 # References: <[^>]+gn08251@erudite\.localdomain>[ \t\n]+<[^>]+>[\ # \t\n]+<[^>]+>[ \t\n]+<[^>]+>$ # Score: 4000 # References: <[^>]+gn08251@erudite\.localdomain>[ \t\n]+<[^>]+>[\ # \t\n]+<[^>]+>[ \t\n]+<[^>]+>[ \t\n]+<[^>]+>$ # Score: 3000 # References: <[^>]+gn08251@erudite\.localdomain>[ \t\n]+<[^>]+>[\ # \t\n]+<[^>]+>[ \t\n]+<[^>]+>[ \t\n]+<[^>]+>[ \t\n]+<\ # [^>]+>$ Given the header # References: <123@foo> <234@bar> <me!> <345@baz> <me!> <456@baz> <567@qux> , both the 6000-pattern and the 4000-pattern will match that article, leaving it with a score of 10000. In order to avoid this, I have to set each of those scores with an =, which has the first one to match wipe out all the other tests. So the above References header scores 6000, as desired. The problem with this, as I've mentioned, is that the =s also skip the scoring I have set up for linecount and poster relevancy. Which is unfortunate. Served with a smile, -- Kerne *whew* Quite a lot of explaining.
Re: slrn: scoring challenge - usage of complement sets
Author: Sven Guckes
Date: Mon, 13 Dec 1999 00:00
Date: Mon, 13 Dec 1999 00:00
27 lines
1727 bytes
1727 bytes
* teasmoke <gn08251@news.giganews.com>:
> I must admit, I don't understand how .. <[^>]+> avoids matching
> <.*gn08251@erudite.localdomain>) but it does.
[] character set
[^] negated character set ("complement")
[^>]+ "at least one non-'>' character"
[abc]* "a sequence of zero or more 'abc's" - eg
�, a, b, c, ab, bc, ca, abc, aab, ccc,
,abcbcbabac, acbabcbabacbabcbac, ...
See?
> Is there a Score: operator to skip the *remaining* tests?
Nope.
Sven
--
Sven Guckes guckes-slrn@math.fu-berlin.de Slrn latest version:
SLRN Home Page: http://www.slrn.org/ Slrn-0.9.5.7 [9907..]
SLRN Wishlist: http://www.slrn.org/wish.html Lots of things to do!
SLRN Author: http://space.mit.edu/~davis/slrn.html John E. Davis aka JED
Re: slrn: scoring challenge - matching *direct* followups
Author: Sven Guckes
Date: Mon, 13 Dec 1999 00:00
Date: Mon, 13 Dec 1999 00:00
15 lines
1322 bytes
1322 bytes
* teasmoke <gn08251@news.giganews.com>: > Of course, <[^>]+> actually doesn't avoid matching > my IDs (which is what I'd mistakenly thought), > it's just that the recipe she provided is happy to match > References: <me> <123@foo> <456@bar> > in *addition* to > References: <me> <789@baz> <me> [groups] Score: References: <me>$ Sven
Re: slrn: scoring challenge - usage of complement sets
Author: teasmoke
Date: Mon, 13 Dec 1999 00:00
Date: Mon, 13 Dec 1999 00:00
48 lines
2613 bytes
2613 bytes
Still, questions about Sven Guckes' hands, which might one day hold *my* Myst
book, are unsettling to me:
> * teasmoke <gn08251@news.giganews.com>:
>
> > I must admit, I don't understand how .. <[^>]+> avoids matching
> > <.*gn08251@erudite.localdomain>) but it does.
>
# [] character set
# [^] negated character set ("complement")
#
# [^>]+ "at least one non-'>' character"
# [abc]* "a sequence of zero or more 'abc's" - eg
# �, a, b, c, ab, bc, ca, abc, aab, ccc,
# ,abcbcbabac, acbabcbabacbabcbac, ...
>
> See?
Well, yes. I know how to use those (whatever they're called), I throw them
around in vi a lot.
Of course, <[^>]+> actually doesn't avoid matching my IDs (which is what
I'd mistakenly thought), it's just that the recipe she provided is happy
to match <me> <123@foo> <456@bar> in *addition* to <me> <789@baz> <me> in
a given References line. (I don't know why similar recipes using [] that I
experimented with didn't.) Which works, though I have to throw in a = to avoid
scores in the 10000s for a given article.
> > Is there a Score: operator to skip the *remaining* tests?
>
> Nope.
Dang.
Oh well. I'll either have to do something with a single either-or recipe of
some sort (don't ask me what), or start using s-lang for my scoring. Or live
without line-count and poster relevancy for replies to me, it's not a big
deal.
Served with a smile,
--
Kerne
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads