<commit_before># Standard ruby hash class extended with some additional behaviour.
class Hash

  # symbolize_keys
  define_method(:symbolize_keys!) do
    self.each do |k,v|
      self[k.to_sym] = v
      self.delete(k)
    end
  end unless method_defined? :symbolize_keys!

  # stringify_keys
  define_method(:stringify_keys!) do
    temp_hash = {}<commit_msg>Make both hash methods work the same.<commit_after># Standard ruby hash class extended with some additional behaviour.
class Hash

  # symbolize_keys
  define_method(:symbolize_keys!) do
    temp_hash = {}
    self.each do |k,v|
      temp_hash[k.to_sym] = self.delete(k)
    end
    temp_hash.each do |k,v|
      self[k] = v
    end
  end unless method_defined? :symbolize_keys!

  # stringify_keys
  define_method(:stringify_keys!) do
    temp_hash = {}
{'fraction_non_alphanumeric': 0.09191176470588236, 'fraction_numerical': 0.0, 'mean_word_length': 3.5898876404494384, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6361688', 'n_tokens_mistral': 271, 'n_tokens_neox': 264, 'n_words': 72}