<commit_before>class Keyword < ActiveRecord::Base
  include LowercaseName
  has_many :taggings
  has_many :entities, through: :taggings, source: :taggable, source_type: "Entity"
  has_many :channels, through: :taggings, source: :taggable, source_type: "Channel"
  has_many :items, through: :taggings, source: :taggable, source_type: "Item"
  has_many :keyword_usages

  enum category: { audience: 0, college: 1, location: 2 }

  # Validations
  validates :name, presence: true
  validates :display_name, presence: true

  default_scope -> {
    order('display_name ASC')
  }

  class << self
    def help_text<commit_msg>Added format category to keywords<commit_after>class Keyword < ActiveRecord::Base
  include LowercaseName
  has_many :taggings
  has_many :entities, through: :taggings, source: :taggable, source_type: "Entity"
  has_many :channels, through: :taggings, source: :taggable, source_type: "Channel"
  has_many :items, through: :taggings, source: :taggable, source_type: "Item"
  has_many :keyword_usages

  enum category: { audience: 0, college: 1, location: 2, format: 3 }

  # Validations
  validates :name, presence: true
  validates :display_name, presence: true

  default_scope -> {
    order('display_name ASC')
  }

  class << self
    def help_text
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.0054988216810683424, 'mean_word_length': 4.981220657276995, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '7619872', 'n_tokens_mistral': 432, 'n_tokens_neox': 416, 'n_words': 119}