<commit_before>class Anime < ActiveRecord::Base
  include PgSearch
  pg_search_scope :fuzzy_search_by_title, against: [:title, :alt_title], 
    using: [:trigram], ranked_by: ":trigram"
  pg_search_scope :simple_search_by_title, against: [:title, :alt_title], 
    using: {:tsearch => {:normalization => 10}}, ranked_by: ":tsearch"

  extend FriendlyId
  friendly_id :title, :use => [:slugged, :history]

  attr_accessible :title, :age_rating, :episode_count, :episode_length, :mal_id, 
    :status, :synopsis, :cover_image, :youtube_video_id, :alt_title,
    :thetvdb_series_id, :thetvdb_season_id

  has_attached_file :cover_image, 
    :styles => { :thumb => "225x335!", :"thumb@2x" => "450x670!" },
    :url => "/system/:hash_:style.:extension",
    :hash_secret => "Tsukiakari no Michishirube"
<commit_msg>Use the canonical title for the permalink.<commit_after>class Anime < ActiveRecord::Base
  include PgSearch
  pg_search_scope :fuzzy_search_by_title, against: [:title, :alt_title], 
    using: [:trigram], ranked_by: ":trigram"
  pg_search_scope :simple_search_by_title, against: [:title, :alt_title], 
    using: {:tsearch => {:normalization => 10}}, ranked_by: ":tsearch"

  extend FriendlyId
  friendly_id :canonical_title, :use => [:slugged, :history]

  attr_accessible :title, :age_rating, :episode_count, :episode_length, :mal_id, 
    :status, :synopsis, :cover_image, :youtube_video_id, :alt_title,
    :thetvdb_series_id, :thetvdb_season_id

  has_attached_file :cover_image, 
    :styles => { :thumb => "225x335!", :"thumb@2x" => "450x670!" },
    :url => "/system/:hash_:style.:extension",
    :hash_secret => "Tsukiakari no Michishirube"

{'fraction_non_alphanumeric': 0.14870559903672487, 'fraction_numerical': 0.018061408789885613, 'mean_word_length': 5.648, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 19, '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': '2927556', 'n_tokens_mistral': 648, 'n_tokens_neox': 596, 'n_words': 122}