<commit_before>%section#instructions
  %h1 Instructions
  %p
    %div.inst-step
      %strong 1
    If there are any keywords, short phrases,
    or abbreviations (like CPS!) that aren't already captured in the current
    keywords list or the categories checkboxes, please add them in one of the boxes
    under the
    %strong Keywords
    section.
    %em Please don't feel obligated to fill the keywords out if they aren't applicable to an entry.
    It's fine to leave them blank.
  %p
    %div.inst-step
      %strong 2
    There are also checkboxes for each
    %strong
      category
    based on the Open Eligibility terms
    we showed you on Tuesday. Please check at least one that accurately describes the services provided by the organization.
    %em
      Please provide the nearest match.
    Better terms can be captured in the keywords.

  %p
    %div.inst-step
      %strong 3
    When finished, click on
    %strong "Save changes"

  %p
    Thank you!

- loc_name = @location.name
- org_name = @location.organization.name
- services = @location.services
= form_tag "edit_services", :name => "edit_form" do
  %div.content-box
    %h1 existing data
    %h2= loc_name == org_name ? loc_name : "#{org_name} / #{loc_name}"
    %p
      %strong= "Description:"
      = @location.description

    - services.each do |service|
      %p#existing-keywords
        %strong= "Existing Keywords:"
        %ul
          - service.keywords.each do |keyword|
            %li
              = keyword

  - services.each do |service|
    %div.inst-box
      %header
        %strong
          1. Keywords:
        Add one or more new keywords
<commit_msg>Verify if keywords exist first before trying to display them<commit_after>%section#instructions
  %h1 Instructions
  %p
    %div.inst-step
      %strong 1
    If there are any keywords, short phrases,
    or abbreviations (like CPS!) that aren't already captured in the current
    keywords list or the categories checkboxes, please add them in one of the boxes
    under the
    %strong Keywords
    section.
    %em Please don't feel obligated to fill the keywords out if they aren't applicable to an entry.
    It's fine to leave them blank.
  %p
    %div.inst-step
      %strong 2
    There are also checkboxes for each
    %strong
      category
    based on the Open Eligibility terms
    we showed you on Tuesday. Please check at least one that accurately describes the services provided by the organization.
    %em
      Please provide the nearest match.
    Better terms can be captured in the keywords.

  %p
    %div.inst-step
      %strong 3
    When finished, click on
    %strong "Save changes"

  %p
    Thank you!

- loc_name = @location.name
- org_name = @location.organization.name
- services = @location.services
= form_tag "edit_services", :name => "edit_form" do
  %div.content-box
    %h1 existing data
    %h2= loc_name == org_name ? loc_name : "#{org_name} / #{loc_name}"
    %p
      %strong= "Description:"
      = @location.description

    - services.each do |service|
      %p#existing-keywords
        %strong= "Existing Keywords:"
        %ul
          - if service.key?(:keywords)
            - service.keywords.each do |keyword|
              %li
                = keyword

  - services.each do |service|
    %div.inst-box
      %header
        %strong
          1. Keywords:
        Add one or more new keywords

{'fraction_non_alphanumeric': 0.07760141093474426, 'fraction_numerical': 0.00411522633744856, 'mean_word_length': 2.3860696517412934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3074073', 'n_tokens_mistral': 995, 'n_tokens_neox': 961, 'n_words': 379}