<commit_before>module Surrealist
  # A helper class to camelize hash keys and deep copy objects
  class Utils
    class << self
      # Deep copies the schema hash.
      #
      # @param [Object] hash object to be copied
      #
      # @return [Object] a copied object
      def deep_copy(hash)
        hash.each_with_object({}) do |(key, value), new|
          value.is_a?(Hash) ? new[key] = deep_copy(value) : new[key] = value
        end
      end

      # Converts hash's keys to camelCase
      #
      # @param [Hash] hash a hash to be camelized
      #
      # @return [Hash] camelized hash
      def camelize_hash(hash)
        if hash.is_a?(Hash)
          Hash[hash.map { |k, v| [camelize_key(k, false), camelize_hash(v)] }]<commit_msg>Typo fix<commit_after>module Surrealist
  # A helper class to camelize hash keys and deep copy objects
  class Utils
    class << self
      # Deep copies the schema hash.
      #
      # @param [Object] hash object to be copied
      #
      # @return [Object] a copied object
      def deep_copy(hash)
        hash.each_with_object({}) do |(key, value), new|
          new[key] = value.is_a?(Hash) ? deep_copy(value) : value
        end
      end

      # Converts hash's keys to camelCase
      #
      # @param [Hash] hash a hash to be camelized
      #
      # @return [Hash] camelized hash
      def camelize_hash(hash)
        if hash.is_a?(Hash)
          Hash[hash.map { |k, v| [camelize_key(k, false), camelize_hash(v)] }]
{'fraction_non_alphanumeric': 0.10472972972972973, 'fraction_numerical': 0.0, 'mean_word_length': 2.2478070175438596, 'pattern_counts': {'":': 0, '<': 7, '<?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': '625976', 'n_tokens_mistral': 487, 'n_tokens_neox': 474, 'n_words': 150}