<commit_before>defmodule Prelude do
  def string_to_int_safe(y) do
    try do
      case y do
        y when is_integer(y) -> y
        y when is_binary(y) -> String.to_integer(y)
      end
    rescue
      ArgumentError -> 0
      e -> raise e
    end
  end

  def atomify_map(map) do
    Enum.map(map, fn {k,v} -> {safe_to_string(k), v} end)<commit_msg>Fixing atomify_map<commit_after>defmodule Prelude do
  def string_to_int_safe(y) do
    try do
      case y do
        y when is_integer(y) -> y
        y when is_binary(y) -> String.to_integer(y)
      end
    rescue
      ArgumentError -> 0
      e -> raise e
    end
  end

  def atomify_map(map) do
    Enum.map(map, fn {k,v} -> {safe_to_atom(k), v} end)
{'fraction_non_alphanumeric': 0.10098176718092566, 'fraction_numerical': 0.002805049088359046, 'mean_word_length': 2.1875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4461369', 'n_tokens_mistral': 272, 'n_tokens_neox': 268, 'n_words': 74}