<commit_before><% if @criterion.errors.any? %>
  <div>
    <h3>
      <%= pluralize(@criterion.errors.count, "error") %>
      prohibited this criterion from being saved:
    </h3>
    <ul>
    <% @criterion.errors.full_messages.each do |msg| %>
      <li><%= msg %></li>
    <% end %>
    </ul>
  </div>
<% end %>
<div class="cms-form">
  <%= form_for [:cms, @activity_classification, @activity, @recommendation, @criterion ] do |f| %>
    <%= f.label :concept_id, 'Concept' %>
    <%= f.collection_select :concept_id,
      Concept.where(visible: true).sort_by { |c| c.lineage },
      :id,
      :lineage
    %>
    <%= f.label :no_incorrect %>
    <%= f.check_box :no_incorrect, {}, 'true', 'false' %>
    <%= f.label :count %>
    <%= f.number_field :count, { min: 0, max: 100 } %>
    <%= f.submit %>
  <% end %><commit_msg>only show concepts tags that have a grandparent (level 0s)<commit_after><% if @criterion.errors.any? %>
  <div>
    <h3>
      <%= pluralize(@criterion.errors.count, "error") %>
      prohibited this criterion from being saved:
    </h3>
    <ul>
    <% @criterion.errors.full_messages.each do |msg| %>
      <li><%= msg %></li>
    <% end %>
    </ul>
  </div>
<% end %>
<div class="cms-form">
  <%= form_for [:cms, @activity_classification, @activity, @recommendation, @criterion ] do |f| %>
    <%= f.label :concept_id, 'Concept' %>
    <%= f.collection_select :concept_id,
      Concept.where("concepts.visible = 'true' and concepts.parent_id is not null").joins(:parent).where("parents_concepts.parent_id is not null").sort_by { |c| c.lineage },
      :id,
      :lineage
    %>
    <%= f.label :no_incorrect %>
    <%= f.check_box :no_incorrect, {}, 'true', 'false' %>
    <%= f.label :count %>
    <%= f.number_field :count, { min: 0, max: 100 } %>
    <%= f.submit %>
  <% end %>
{'fraction_non_alphanumeric': 0.20473307649972483, 'fraction_numerical': 0.007154650522839846, 'mean_word_length': 2.986842105263158, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, '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': '6610546', 'n_tokens_mistral': 749, 'n_tokens_neox': 669, 'n_words': 141}