<commit_before>import json
import collections

"""

python camdennewjournal_summary.py | sort -nr | head -n 1000 | gist -p 
outputs top 1000 to a gist:
https://gist.github.com/Bjwebb/d8000e1aa0acccd3cf4665bb0fcc221c

"""

with open('data/camdennewjournal_entities.json') as fp:
    entities = json.load(fp, object_pairs_hook=collections.OrderedDict)

for entity, pages in entities.items():<commit_msg>[#21] Update CNJ summary script with new paths<commit_after>import json
import collections

"""

python camdennewjournal_summary.py | sort -nr | head -n 1000 | gist-paste -p -u d8000e1aa0acccd3cf4665bb0fcc221c
outputs top 1000 entities with more than one word to a gist:
https://gist.github.com/Bjwebb/d8000e1aa0acccd3cf4665bb0fcc221c

"""

with open('data/saved_camdennewjournal_entities.json') as fp:
    entities = json.load(fp, object_pairs_hook=collections.OrderedDict)

for entity, pages in entities.items():
{'fraction_non_alphanumeric': 0.0994535519125683, 'fraction_numerical': 0.06885245901639345, 'mean_word_length': 5.49645390070922, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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}}
{'dir': 'git-commits-cleaned', 'id': '5187380', 'n_tokens_mistral': 366, 'n_tokens_neox': 328, 'n_words': 78}