[news.software.b] Thread following in newsgroups

pcolmer@acorn.co.uk (Philip Colmer) (03/15/91)

My apologies if this is not the right newsgroup for the following query. If
it isn't, perhaps someone could direct me at the right newsgroup.

For about 6 months now, we have been using a news reader which I wrote and I
am considering revisiting it to improve certain areas of its functionality.
One of those areas is the way it follows threads.

Thread following does not appear to be an easy thing to achieve. Consider
the following articles:

 (1) Subject: foo
 (2) Subject: Re: foo
 (3) Subject: Re: foo
     References: <1>
 (4) Subject: Re: foo
     References: <2>
 (5) Subject: Bar (was Re: foo)
     References: <3> <1>

This is not the most pathalogical example of the sort of situation news
readers have to cope with, but it should do.

Now, I suspect that the most logical order for reading these would be
1,2,4,3,5 or 1,3,5,2,4. When I started writing my news reader, the approach
I took was one of if the next article refers to the ORIGINAL article, then
display it. This is obviously flawed because there is absolutely no
guarantee that the original article will be referenced. So the rule got
changed to check for references to the last read article as well. This was
better, but it still wouldn't catch articles like (2).

So, the current approach is to display any article which either refers to
the last read article OR whose subject line contains the same subject as the
last read article. This certainly seems to catch all the articles in a
thread, but it also causes branches away due to articles like (5).

Finally, one of the requests I've had is to try and display the articles in
the "right" order. Due to the vagaries of the news system, it is often
possible for a reply to arrive at our site before the original article!

So, after all that, does anyone have any logic or techniques that could be
used in my news reader to make my thread following better?

--Philip Colmer

------------------------------------------------------------------------------
Philip Colmer, OA Project Leader, Acorn Computers Ltd (pcolmer@acorn.co.uk)

urlichs@smurf.sub.org (Matthias Urlichs) (03/20/91)

In news.software.b, article <5871@acorn.co.uk>,
  pcolmer@acorn.co.uk (Philip Colmer) writes:
< 
< Finally, one of the requests I've had is to try and display the articles in
< the "right" order. Due to the vagaries of the news system, it is often
< possible for a reply to arrive at our site before the original article!
< 
< So, after all that, does anyone have any logic or techniques that could be
< used in my news reader to make my thread following better?
< 
What I'm doing is:
- Any article is sorted before any article it refers to.
- Articles on the same level are sorted according to whatever the user wants.
- Missing articles inherit their search criterions from the lowest-numbered
  answer to them, for lack of better data.
- Sorting disregards the number of answers to which an article refers. It
  might make sense to sort for tree depth, but that would mean that sorting a
  new article into the list takes longer.

This gives you depth-first order, which seems reasonable.

"Whatever the user wants", above, means that my news reader allows
specification of more than one sort level. Most sorts are alphabetic; sort of
date is numeric according to getdate, sort of From address will sort by host
name first once I get around to actually implementing that, and the article
tree (References: header) sorts by tree before handing articles on the same
tree level off to the next sort level.

That approach seems to work.

NB: This news reader is called NewsView, currently in the stage of getting
    essential features (like posting) added to it, and available on the
    Macintosh.
-- 
Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de     /(o\
Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49-721-621127(0700-2330)   \o)/