<jupyter_start><jupyter_text>lec11<jupyter_code>with open('jmu_news.txt','r') as jmu_news:
  text_content = jmu_news.read()
  word_list = text_content.split()
  count_result = Counter(word_list)
  for word, count in count_result.most_common(10):
    print(word,count)
from collections import Counter
count_result = Counter ( ['a', 'b', 'b'])
print(count_result)<jupyter_output>Counter({'b': 2, 'a': 1})<jupyter_text>ex1<jupyter_code>print('    {} salary is ${}''.format('Tom' , 60000) )<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.023255813953488372, 'mean_word_length': 7.475409836065574, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '614605', 'license': 'MIT', 'n_tokens_mistral': 214, 'n_tokens_neox': 201, 'n_words': 34, 'path': 'lec11.ipynb', 'repo_name': 'bushjd/ia241-github-1', 'size': '516'}