#!/usr/bin/env python3

import re, collections
text = 'This is a test. Of something.'
L = []
for word in text.split():
    word = word.lower()
    word = re.sub(r"^[_\d\W]+|[_\d\W]+$", "", word)
    L.append(word)

counts = collections.Counter(L)
print(counts.most_common(10))

# to be continued
#  * read austen, shakespeare
#  * do by percentage of word
#  * how different, how much the same?

