<commit_before>module Kuhsaft
  module PagePart
    class Base
      def initialize hash
        hash.each_pair do |k,v|
          self.send "#{k}=", v
        end
      end
    end
  end
end<commit_msg>add todo for page parts<commit_after>module Kuhsaft
  module PagePart
    class Base
      
      #
      # TODO: behave like ActiveModel for validations etc
      # http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/
      #
      def initialize hash
        hash.each_pair do |k,v|
          self.send "#{k}=", v
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08571428571428572, 'fraction_numerical': 0.013445378151260505, 'mean_word_length': 1.9073170731707316, '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': '6328461', 'n_tokens_mistral': 200, 'n_tokens_neox': 194, 'n_words': 51}