<commit_before><%= form_for(@snippet) do |f| %>
  <% if @snippet.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@snippet.errors.count, "error") %> prohibited this snippet from being saved:</h2>

      <ul>
      <% @snippet.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :title %><br>
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :language %><br>
    <%= f.number_field :language %>
  </div>
  <div class="field">
    <%= f.label :content %><br>
    <%= f.text_area :content %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %><commit_msg>Use dropdown field for snippet language in form<commit_after><%= form_for(@snippet) do |f| %>
  <% if @snippet.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@snippet.errors.count, "error") %> prohibited this snippet from being saved:</h2>

      <ul>
      <% @snippet.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :title %><br>
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :language %><br>
    <%= f.select :language, Snippet.languages.keys.map { |k| [k.humanize, k] } %>
  </div>
  <div class="field">
    <%= f.label :content %><br>
    <%= f.text_area :content %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.22809278350515463, 'fraction_numerical': 0.002577319587628866, 'mean_word_length': 2.7694174757281553, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, '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': '3931091', 'n_tokens_mistral': 632, 'n_tokens_neox': 568, 'n_words': 125}