Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 16 lines (13 sloc) 378 Bytes
#!/usr/bin/env python
from __future__ import print_function
import json
import fileinput
import collections
counts = collections.Counter()
for line in fileinput.input():
tweet = json.loads(line)
for tag in tweet['entities']['hashtags']:
t = tag['text'].lower()
counts[t] += 1
for tag, count in counts.most_common():
print("%5i %s" % (count, tag))
You can’t perform that action at this time.