<commit_before># -*- coding: utf-8 -*-
"""
Created on Mon Nov 24 21:23:28 2014

@author: polbaladas
"""


import numpy as np
import matplotlib.pyplot as plt
import string

alpha = string.ascii_lowercase
alpha_cap = string.ascii_uppercase
number = ['1','2','3','4','5','6','7','8','9','0']

def frequency(text, plot_bool):
    c = text
    letters_count = [0]*27
    numbers_count = [None]*27
    i = 0
        
    while i<len(alpha):
        letters_count[i] = c.count(alpha[i])+c.count(alpha_cap[i])        
        i+=1

    #i = 0
    #while i<len(number):
    #    numbers_count[i] = c.count(number[i])        
    #    i+=1<commit_msg>Refractored stuff about the numbers count<commit_after># -*- coding: utf-8 -*-
"""
Created on Mon Nov 24 21:23:28 2014

@author: polbaladas
"""


import numpy as np
import matplotlib.pyplot as plt
import string

alpha = string.ascii_lowercase
alpha_cap = string.ascii_uppercase

def frequency(text, plot_bool):
    c = text
    letters_count = [0]*27
    #numbers_count = [None]*27
    i = 0
        
    while i<len(alpha):
        letters_count[i] = c.count(alpha[i])+c.count(alpha_cap[i])        
        i+=1

    #i = 0
    #while i<len(number):
    #    numbers_count[i] = c.count(number[i])        
    #    i+=1
{'fraction_non_alphanumeric': 0.15317460317460319, 'fraction_numerical': 0.04285714285714286, 'mean_word_length': 2.764179104477612, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2051294', 'n_tokens_mistral': 488, 'n_tokens_neox': 452, 'n_words': 104}