Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 14 lines (12 sloc) 0.342 kb
#!/usr/bin/env python
import sys
import re
for line in sys.stdin:
# remove non alpha-numeric
line = re.sub("[^a-zA-Z0-9]", " ", line)
line = line.strip().lower()
# split the line into words
words = line.split()
for word in words:
# tab-delimited; this word happened 1 times
print '%s\t%s' % (word, 1)
Jump to Line
Something went wrong with that request. Please try again.