<commit_before># == Schema Information
#
# Table name: media_contents
#
#  id               :integer          not null, primary key
#  external_id      :integer
#  external_url     :string
#  type             :string
#  author           :string
#  licence          :string
#  publication_date :date
#  description      :text
#  created_at       :datetime         not null
#  updated_at       :datetime         not null
#

class MediaContent < ApplicationRecord
  include Featurable
  acts_as_taggable

  TYPE_ALBUM = "Album"
  TYPE_PHOTO = "Photo"
  TYPE_VIDEO = "Video"
  TYPE_GRAPHIC = "Graphic"
  TYPE_COLLECTION = "Collection"
  TYPE_VIDEO_COLLECTION = "VideoCollection"

  # {display => filter_types}
  FILTERS = {
    TYPE_GRAPHIC => TYPE_COLLECTION,
    TYPE_PHOTO => TYPE_ALBUM,
    TYPE_VIDEO => TYPE_VIDEO<commit_msg>* Video collection in the media library filters<commit_after># == Schema Information
#
# Table name: media_contents
#
#  id               :integer          not null, primary key
#  external_id      :integer
#  external_url     :string
#  type             :string
#  author           :string
#  licence          :string
#  publication_date :date
#  description      :text
#  created_at       :datetime         not null
#  updated_at       :datetime         not null
#

class MediaContent < ApplicationRecord
  include Featurable
  acts_as_taggable

  TYPE_ALBUM = "Album"
  TYPE_PHOTO = "Photo"
  TYPE_VIDEO = "Video"
  TYPE_GRAPHIC = "Graphic"
  TYPE_COLLECTION = "Collection"
  TYPE_VIDEO_COLLECTION = "VideoCollection"

  # {display => filter_types}
  FILTERS = {
    TYPE_GRAPHIC => TYPE_COLLECTION,
    TYPE_PHOTO => TYPE_ALBUM,
    TYPE_VIDEO => [TYPE_VIDEO, TYPE_VIDEO_COLLECTION]
{'fraction_non_alphanumeric': 0.0793928779918272, 'fraction_numerical': 0.0, 'mean_word_length': 2.654584221748401, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '7131398', 'n_tokens_mistral': 556, 'n_tokens_neox': 548, 'n_words': 129}