Rewrite of trending word generation