<commit_before>class ClaimantPresenter < Presenter
  def subsections
    { personal_details: %i<full_name gender date_of_birth is_disabled>,
      contact_details: %i<address telephone_number mobile_number email_address contact_preference> }
  end

  def full_name
    salutation = t("simple_form.options.claimant.title.#{title}") if target.title
    [salutation, first_name, last_name].compact.join ' '
  end

  def gender
    if target.gender
      I18n.t "simple_form.options.claimant.gender.#{target.gender}"
    end
  end

  def date_of_birth
    date target.date_of_birth
  end

  def address
    AddressPresenter.present(self)
  end

  def telephone_number
    address_telephone_number
  end

  present :mobile_number, :email_address

  def contact_preference
    if target.contact_preference
      t "simple_form.options.claimant.contact_preferences.#{target.contact_preference}"
    end
  end

  def is_disabled
    yes_no special_needs
  end

  def is_applying_for_remission<commit_msg>Fix contact preference lookup in claimant presenter<commit_after>class ClaimantPresenter < Presenter
  def subsections
    { personal_details: %i<full_name gender date_of_birth is_disabled>,
      contact_details: %i<address telephone_number mobile_number email_address contact_preference> }
  end

  def full_name
    salutation = t("simple_form.options.claimant.title.#{title}") if target.title
    [salutation, first_name, last_name].compact.join ' '
  end

  def gender
    if target.gender
      I18n.t "simple_form.options.claimant.gender.#{target.gender}"
    end
  end

  def date_of_birth
    date target.date_of_birth
  end

  def address
    AddressPresenter.present(self)
  end

  def telephone_number
    address_telephone_number
  end

  present :mobile_number, :email_address

  def contact_preference
    if target.contact_preference
      t "simple_form.options.claimant.contact_preference.#{target.contact_preference}"
    end
  end

  def is_disabled
    yes_no special_needs
  end

  def is_applying_for_remission
{'fraction_non_alphanumeric': 0.06505667816658453, 'fraction_numerical': 0.001971414489896501, 'mean_word_length': 3.9877149877149876, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '506953', 'n_tokens_mistral': 663, 'n_tokens_neox': 633, 'n_words': 137}