<commit_before>
class Article < ActiveRecord::Base

  attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent,
                  :allow_members_to_edit, :translation_of_id, :language,
                  :license_id, :parent_id, :display_posts_in_current_language,
                  :category_ids, :posts_per_page, :moderate_comments,
                  :accept_comments, :feed, :published, :source, :source_name,
                  :highlighted, :notify_comments, :display_hits, :slug,
                  :external_feed_builder, :display_versions, :external_link,
                  :image_builder, :show_to_followers, :published_at, :person_followers

  acts_as_having_image

  SEARCHABLE_FIELDS = {
    :name => {:label => _('Name'), :weight => 10},
    :abstract => {:label => _('Abstract'), :weight => 3},
    :body => {:label => _('Content'), :weight => 2},
    :slug => {:label => _('Slug'), :weight => 1},
    :filename => {:label => _('Filename'), :weight => 1},
  }

  SEARCH_FILTERS = {
    :order => %w[more_recent more_popular more_comments],
    :display => %w[full]
  }

  def initialize(*params)
    super

    if !params.blank? && params.first.has_key?(:profile)
      profile = params.first[:profile]
      self.published = false unless profile.public?
    end

  end
<commit_msg>Article Following - initial version<commit_after>class Article < ActiveRecord::Base

  attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent,
                  :allow_members_to_edit, :translation_of_id, :language,
                  :license_id, :parent_id, :display_posts_in_current_language,
                  :category_ids, :posts_per_page, :moderate_comments,
                  :accept_comments, :feed, :published, :source, :source_name,
                  :highlighted, :notify_comments, :display_hits, :slug,
                  :external_feed_builder, :display_versions, :external_link,
                  :image_builder, :show_to_followers, :published_at, :person_followers


  acts_as_having_image

  SEARCHABLE_FIELDS = {
    :name => {:label => _('Name'), :weight => 10},
    :abstract => {:label => _('Abstract'), :weight => 3},
    :body => {:label => _('Content'), :weight => 2},
    :slug => {:label => _('Slug'), :weight => 1},
    :filename => {:label => _('Filename'), :weight => 1},
  }

  SEARCH_FILTERS = {
    :order => %w[more_recent more_popular more_comments],
    :display => %w[full]
  }

  def initialize(*params)
    super

    if !params.blank? && params.first.has_key?(:profile)
      profile = params.first[:profile]
      self.published = false unless profile.public?
    end

  end

{'fraction_non_alphanumeric': 0.14768413059984814, 'fraction_numerical': 0.004555808656036446, 'mean_word_length': 3.1043613707165107, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '7518117', 'n_tokens_mistral': 864, 'n_tokens_neox': 801, 'n_words': 170}