<commit_before>module Charisma
  class Characterization
    attr_reader :characteristics
    
    def initialize
      @characteristics = {}
    end
    
    def [](name)
      characteristics[name]
    end
    
    include Blockenspiel::DSL
    def has(name, options = {}, &blk)
      name = name.to_sym
      characteristics[name] = Characteristic.new(name, options, &blk)
    end
  end
end<commit_msg>subclass Hash<commit_after>module Charisma
  class Characterization < Hash    
    include Blockenspiel::DSL
    def has(name, options = {}, &blk)
      name = name.to_sym
      self[name] = Characteristic.new(name, options, &blk)
    end
  end
end
{'fraction_non_alphanumeric': 0.09202453987730061, 'fraction_numerical': 0.0, 'mean_word_length': 2.818713450292398, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4647103', 'n_tokens_mistral': 202, 'n_tokens_neox': 201, 'n_words': 49}