<commit_before>require_dependency "renalware/modalities"

module Renalware
  module Modalities
    class ReasonsController < BaseController
      skip_after_action :verify_authorized

      def index
        @reason_hd_pd = HaemodialysisToPD.all
        @reason_pd_hd = PDToHaemodialysis.all

        type = params[:modal_change_type] ? "Renalware::Modalities::#{(params[:modal_change_type]).camelize}" : nil
        @modality_reason_select = Reason.where(type: type)

        respond_to do |format|
          format.html
          format.json {<commit_msg>Shortened line.<commit_after>require_dependency "renalware/modalities"

module Renalware
  module Modalities
    class ReasonsController < BaseController
      skip_after_action :verify_authorized

      def index
        @reason_hd_pd = HaemodialysisToPD.all
        @reason_pd_hd = PDToHaemodialysis.all

        type = params[:modal_change_type] ?
          "Renalware::Modalities::#{(params[:modal_change_type]).camelize}" : nil
        @modality_reason_select = Reason.where(type: type)

        respond_to do |format|
          format.html
          format.json {
{'fraction_non_alphanumeric': 0.08259325044404973, 'fraction_numerical': 0.0, 'mean_word_length': 3.285171102661597, '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': '4041230', 'n_tokens_mistral': 349, 'n_tokens_neox': 330, 'n_words': 59}