<commit_before># Recognization 是访问者识别，用于维护访问者和参与者的对应关系。

class Unidom::Visitor::Recognization < ActiveRecord::Base

  self.table = 'unidom_recognizations'

  belongs_to :visitor, polymorphic: true
  belongs_to :party,   polymorphic: true

  scope :visitor_is,  ->(visitor) { where visitor: visitor }
  scope :party_is,    ->(party)   { where party:   party   }

  include ::Unidom::Common::Concerns::ModelExtension

  def self.cognize(visitor, party)
    raise 'Visitor can not be null.' if visitor.blank?
    raise 'Party can not be null.'   if party.blank?<commit_msg>1, Improved the coding style of Recognition model.<commit_after># Recognization 是访问者识别，用于维护访问者和参与者的对应关系。

class Unidom::Visitor::Recognization < ActiveRecord::Base

  self.table = 'unidom_recognizations'

  belongs_to :visitor, polymorphic: true
  belongs_to :party,   polymorphic: true

  scope :visitor_is,  ->(visitor) { where visitor: visitor }
  scope :party_is,    ->(party)   { where party:   party   }

  include Unidom::Common::Concerns::ModelExtension

  def self.cognize(visitor, party)
    raise 'Visitor can not be null.' if visitor.blank?
    raise 'Party can not be null.'   if party.blank?
{'fraction_non_alphanumeric': 0.1072340425531915, 'fraction_numerical': 0.000851063829787234, 'mean_word_length': 4.419354838709677, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '921272', 'n_tokens_mistral': 429, 'n_tokens_neox': 419, 'n_words': 104}