<commit_before>class TextBlock < ActiveRecord::Base
  include StandardModelExtensions
  include AnnotatableExtensions
  include MetadataExtensions
  include Rails.application.routes.url_helpers
  include CaptchaExtensions
  include VerifiedUserExtensions
  include DeletedItemExtensions
  include FormattingExtensions

  RATINGS_DISPLAY = {
    :collaged => "Collaged",
    :bookmark => "Bookmarked",
    :add => "Added to"
  }

  acts_as_taggable_on :tags

  has_many :annotations, :through => :collages
  has_many :collages, :as => :annotatable
  has_many :defects, :as => :reportable
  has_many :playlist_items, :as => :actual_object
  belongs_to :user

  accepts_nested_attributes_for :metadatum

  def self.tag_list<commit_msg>Validation on text block name.<commit_after>class TextBlock < ActiveRecord::Base
  include StandardModelExtensions
  include AnnotatableExtensions
  include MetadataExtensions
  include Rails.application.routes.url_helpers
  include CaptchaExtensions
  include VerifiedUserExtensions
  include DeletedItemExtensions
  include FormattingExtensions

  RATINGS_DISPLAY = {
    :collaged => "Collaged",
    :bookmark => "Bookmarked",
    :add => "Added to"
  }

  acts_as_taggable_on :tags

  has_many :annotations, :through => :collages
  has_many :collages, :as => :annotatable
  has_many :defects, :as => :reportable
  has_many :playlist_items, :as => :actual_object
  belongs_to :user

  validates_presence_of :name
  accepts_nested_attributes_for :metadatum

  def self.tag_list
{'fraction_non_alphanumeric': 0.07677035076108538, 'fraction_numerical': 0.0, 'mean_word_length': 5.146341463414634, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '5414447', 'n_tokens_mistral': 470, 'n_tokens_neox': 461, 'n_words': 107}