Skip to content

Instantly share code, notes, and snippets.

View cewing's full-sized avatar

Cris Ewing cewing

View GitHub Profile
# This submission is From Will Weatherford
from collections import Counter
import re
SEP = r'[\*]{10,999}'
def make_corpae(open_text_file):
text = open_text_file.read()
corpae = {corp: make_trigram_counts(corp) for corp in re.split(SEP, text)}