<commit_before>class Field::ChoiceSetPresenter < FieldPresenter
  delegate :choices, :selected_choice, :to => :field
  delegate :browse_similar_items_link, :content_tag, :to => :view

  def input(form, method, options={})
    form.select(
      method,
      nil,
      input_defaults(options).reverse_merge(:include_blank => true),
      &method(:options_for_select)
    )
  end

  def value
    choice = selected_choice(item)
    return if choice.nil?
    value_slug = [I18n.locale, choice.short_name].join("-")
    browse_similar_items_link(choice.long_name, item, field, value_slug)
  end<commit_msg>Use display logic when showing choice values<commit_after>class Field::ChoiceSetPresenter < FieldPresenter
  delegate :choices, :selected_choice, :to => :field
  delegate :browse_similar_items_link, :content_tag, :to => :view

  def input(form, method, options={})
    form.select(
      method,
      nil,
      input_defaults(options).reverse_merge(:include_blank => true),
      &method(:options_for_select)
    )
  end

  def value
    choice = selected_choice(item)
    return if choice.nil?
    value_slug = [I18n.locale, choice.short_name].join("-")
    browse_similar_items_link(choice.long_display_name, item, field, value_slug)
  end
{'fraction_non_alphanumeric': 0.11226944667201283, 'fraction_numerical': 0.0032076984763432237, 'mean_word_length': 4.265822784810126, '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': '4322570', 'n_tokens_mistral': 405, 'n_tokens_neox': 398, 'n_words': 83}