What's a good set of heuristics for threading tweets?

Viewed 664

Everyone knows, if you want to thread emails you use Jamie Zawinski's algorithm. But it's a new century, and there's a new messaging service.

What's the best algorithm for threading status updates posted on Twitter?

Things I'd definitely like it to cope with:

  • The easy part: using in_reply_to_status_id, in_reply_to_user_id and in_reply_to_screen_name. (Incidentally, finding proper documentation of these values would be useful in itself! Such documentation isn't obviously linked to from here, for example.)

  • Good heuristics for inferring a "reply" relationship from messages that mention a user with the @ convention but aren't explicitly in reply to a particular message. These "mentions" are provided in the "entities" element of statuses now if you request that. These heuristics might take into account (a) the time between two status updates, (b) whether there are subsquent replies between the two users, etc. (Replies that consist of an old-style retweet with an additional comment, as mentioned by user85509 below are just an instance of this style of reply.)

  • Conversations that take place between more than two users.

  • Working with a set of tweets given to the algorithm, or all tweets on Twitter.

... but perhaps you can think of more.

2 Answers
Related