<commit_before>#!/usr/bin/env python
import sys, json, re

digits = re.compile('\d')

def valid_word(word):
    if bool(digits.search(word)):
        # Don't allow digits in any of our words
        return False
    if len(word) < 4:
        # Only want longer words
        return False
    return True

with open('rawdata.txt') as f:
    lines = f.read().lower().splitlines()
    words = dict(filter(lambda y: valid_word(y[0]), zip(lines[::2], map(lambda x: x.split('|')[:20:2], lines[1::2]))))
    for w in words:
        print w<commit_msg>print out words and shit<commit_after>#!/usr/bin/env python
import sys, json, re

digits = re.compile('\d')

def valid_word(word):
    if bool(digits.search(word)):
        # Don't allow digits in any of our words
        return False
    if len(word) < 4:
        # Only want longer words
        return False
    return True

with open('rawdata.txt') as f:
    lines = f.read().lower().splitlines()
    words = dict(filter(lambda y: valid_word(y[0]), zip(lines[::2], map(lambda x: x.split('|')[:20:2], lines[1::2]))))
    for w in words:
        print w + ': ' + ', '.join(words[w])
{'fraction_non_alphanumeric': 0.16400709219858156, 'fraction_numerical': 0.014184397163120567, 'mean_word_length': 2.9475524475524475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '3598857', 'n_tokens_mistral': 392, 'n_tokens_neox': 382, 'n_words': 112}