<commit_before>class ArtefactsController < ApplicationController
  before_filter :find_artefact, :only => [:show, :edit]
  before_filter :build_artefact, :only => [:new, :create]
  before_filter :tag_collection, :only => [:new, :edit]

  respond_to :html, :json

  def index
    @artefacts = Artefact.order_by([[:name, :asc]])

    @section = params[:section] || "all"
    if @section != "all"
      @artefacts = @artefacts.where(tag_ids: params[:section])<commit_msg>Clarify when tag_collection is needed<commit_after>class ArtefactsController < ApplicationController
  before_filter :find_artefact, :only => [:show, :edit]
  before_filter :build_artefact, :only => [:new, :create]
  before_filter :tag_collection, :except => [:show]

  respond_to :html, :json

  def index
    @artefacts = Artefact.order_by([[:name, :asc]])

    @section = params[:section] || "all"
    if @section != "all"
      @artefacts = @artefacts.where(tag_ids: params[:section])
{'fraction_non_alphanumeric': 0.1506276150627615, 'fraction_numerical': 0.0, 'mean_word_length': 5.134615384615385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6873753', 'n_tokens_mistral': 328, 'n_tokens_neox': 325, 'n_words': 72}