<commit_before>class Xhtml < ActiveRecord::Base
  belongs_to :user
  has_many :page_elements, :as => :embeddable
  has_many :pages, :through =>:page_elements
  has_many :teacher_notes, :as => :authored_entity

  acts_as_replicatable

  include Changeable
  include TruncatableXhtml
  # Including TruncatableXhtml adds a before_save hook which will automatically
  # generate a name attribute for the model instance if there is any content on 
  # the main xhtml attribute (examples: content or prompt) that can plausibly be 
  # turned into a name. Otherwise the default_value_for :name specified below is used.
  
  self.extend SearchableModel
  
  @@searchable_attributes = %w{uuid name description content}
  
  class <<self
    def searchable_attributes
      @@searchable_attributes
    end
  end

  default_value_for :name, "text content"
  default_value_for :description, "description ..."
  default_value_for :content, "<p>content goes here ...</p>"

  send_update_events_to :investigations
  
  def self.display_name
    "Text Content"
  end
  
  def investigations
    invs = []<commit_msg>Text Content was geek speak according to authors.<commit_after>class Xhtml < ActiveRecord::Base
  belongs_to :user
  has_many :page_elements, :as => :embeddable
  has_many :pages, :through =>:page_elements
  has_many :teacher_notes, :as => :authored_entity

  acts_as_replicatable

  include Changeable
  include TruncatableXhtml
  # Including TruncatableXhtml adds a before_save hook which will automatically
  # generate a name attribute for the model instance if there is any content on 
  # the main xhtml attribute (examples: content or prompt) that can plausibly be 
  # turned into a name. Otherwise the default_value_for :name specified below is used.
  
  self.extend SearchableModel
  
  @@searchable_attributes = %w{uuid name description content}
  
  class <<self
    def searchable_attributes
      @@searchable_attributes
    end
  end

  default_value_for :name, "text content"
  default_value_for :description, "description ..."
  default_value_for :content, "<p>content goes here ...</p>"

  send_update_events_to :investigations
  
  def self.display_name
    "Text"
  end
  
  def investigations
    invs = []
{'fraction_non_alphanumeric': 0.06867145421903052, 'fraction_numerical': 0.0, 'mean_word_length': 4.112385321100917, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2086196', 'n_tokens_mistral': 678, 'n_tokens_neox': 649, 'n_words': 218}