<commit_before>#
# Lists axioms of an ontology
#
class AxiomsController < InheritedResources::Base

  belongs_to :ontology

  actions :index
  has_pagination

  respond_to :html, only: %i(index)

  before_filter :check_read_permissions

  protected

  def check_read_permissions
    authorize! :show, parent.repository
  end

  def collection
    @collection ||=
      if display_all?
        axioms =
          if logically_translated?
            parent.all_axioms
          else
            parent.translated_axioms
          end
        Kaminari.paginate_array(axioms).page(params[:page])
      else
        super
      end
  end

  def logically_translated?
    parent.contains_logic_translations?
  end

  helper_method :logically_translated?
end<commit_msg>Call correct methods in the AxiomsController.<commit_after>#
# Lists axioms of an ontology
#
class AxiomsController < InheritedResources::Base

  belongs_to :ontology

  actions :index
  has_pagination

  respond_to :html, only: %i(index)

  before_filter :check_read_permissions

  protected

  def check_read_permissions
    authorize! :show, parent.repository
  end

  def collection
    @collection ||=
      if display_all?
        axioms =
          if logically_translated?
            parent.axioms
          else
            parent.translated_axioms
          end
        Kaminari.paginate_array(axioms).page(params[:page])
      else
        Kaminari.paginate_array(parent.axioms.original).page(params[:page])
      end
  end

  def logically_translated?
    parent.contains_logic_translations?
  end

  helper_method :logically_translated?
end
{'fraction_non_alphanumeric': 0.0630407911001236, 'fraction_numerical': 0.0, 'mean_word_length': 2.863961813842482, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3935314', 'n_tokens_mistral': 517, 'n_tokens_neox': 482, 'n_words': 106}