<commit_before>class CKAN3Hash < Hash
  def initialize(list, key_name, value_name)
    super()
      self[item[key_name]] = item
    (list || []).each do |item|
    end
    @value_name = value_name
  end

  def [](key)
    if value = super(key)
      value[@value_name]
    end
  end

  def values
    super.map {|value| value[@value_name]}
  end
end<commit_msg>Simplify hash wrapper implementation<commit_after>class CKAN3Hash < Hash
  def initialize(list, key_name, value_name)
    super()
    (list || []).each do |item|
      self[item[key_name]] = item[value_name]
    end
  end
end
{'fraction_non_alphanumeric': 0.11925042589437819, 'fraction_numerical': 0.0034071550255536627, 'mean_word_length': 3.2302158273381294, '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': '2214057', 'n_tokens_mistral': 209, 'n_tokens_neox': 202, 'n_words': 52}