Skip to content

Instantly share code, notes, and snippets.

@robflaherty
Created April 23, 2019 15:40
Show Gist options
  • Save robflaherty/b9d59195f4d0cab29b4e9ef38f067150 to your computer and use it in GitHub Desktop.
Save robflaherty/b9d59195f4d0cab29b4e9ef38f067150 to your computer and use it in GitHub Desktop.
Simple word frequency counter
import re
words = re.findall(r'\w+', open('term-list.csv').read().lower())
counts = Counter(words).most_common(500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment