title: What is the best way to compute trending topics or tags?
body: <p>Many sites offer some statistics like &quot;The hottest topics in the last 24h&quot;. For example, Topix.com shows this in its section &quot;News Trends&quot;. There, you can see the topics which have the fastest growing number of mentions.</p>
  <p>I want to compute such a &quot;buzz&quot; for a topic, too. How could I do this? The algorithm should weight the topics which are always hot less. The topics which normally (almost) no one mentions should be the hottest ones.</p>
  <p>Google offers &quot;Hot Trends&quot;, topix.com shows &quot;Hot Topics&quot;, fav.or.it shows &quot;Keyword Trends&quot; - all these services have one thing in common: They only show you upcoming trends which are abnormally hot at the moment.</p>
  <p>Terms like &quot;Britney Spears&quot;, &quot;weather&quot; or &quot;Paris Hilton&quot; won't appear in these lists because they're always hot and frequent. <a href="https://www.americanscientist.org/article/the-britney-spears-problem" rel="noreferrer">This article calls this &quot;The Britney Spears Problem&quot;.</a></p>
  <p>My question: How can you code an algorithm or use an existing one to solve this problem? Having a list with the keywords searched in the last 24h, the algorithm should show you the 10 (for example) hottest ones.</p>
  <p>I know, in the article above, there is some kind of algorithm mentioned. <a href="http://paste.bradleygill.com/index.php?paste_id=9117" rel="noreferrer">I've tried to code it in PHP</a> but I don't think that it'll work. It just finds the majority, doesn't it?</p>
  <p>I hope you can help me (coding examples would be great).</p>