<commit_before>module Oriental
  module Document
    extend ActiveSupport::Concern

    included do
      include Virtus::Model
      include Oriental::Attributes::Base
    end

    module ClassMethods
      def find(*args)
        Oriental::Criteria.new(self).find(args)
      end
    end

    def initialize(record = {})
      unless record.empty?
        
      record[:properties] = record.clone
        
      map = record.map do |k, v|
        k = k.to_s[1..-1].to_sym if k.to_s[0] == "@"
        k = :klass if k == :class
        [k, v]
      end
        
      record = Hash[map]

      super record
    end

    def new?
      !rid
    end

  end
end<commit_msg>minor fix<commit_after>module Oriental
  module Document
    extend ActiveSupport::Concern

    included do
      include Virtus::Model
      include Oriental::Attributes::Base
    end

    module ClassMethods
      def find(*args)
        Oriental::Criteria.new(self).find(args)
      end
    end

    def initialize(record = {})
      unless record.empty?
        record[:properties] = record.clone
          
        map = record.map do |k, v|
          k = k.to_s[1..-1].to_sym if k.to_s[0] == "@"
          k = :klass if k == :class
          [k, v]
        end
          
        record = Hash[map]
      end

      super record
    end

    def new?
      !rid
    end

  end
end
{'fraction_non_alphanumeric': 0.10022107590272661, 'fraction_numerical': 0.004421518054532056, 'mean_word_length': 1.6732283464566928, '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': '5361803', 'n_tokens_mistral': 432, 'n_tokens_neox': 416, 'n_words': 109}