<commit_before><%= form_tag(transmogrify_patterns_path) do %>

<div class="btn-toolbar">
  <div class="btn-group">
    <%= link_to "New Pattern", new_pattern_path, :class => "btn btn-success"%>
  </div>
  <div class="btn-group left-boarder">
    <%= button_tag("Monitor selected on:", :class => "btn btn-warning", :name => "monitor") %>
    <%= select_tag("repository_id", options_from_collection_for_select(@repositories, "id", "name")) %>
  </div>
  <div class="btn-group left-boarder">
    <%= button_tag("Translate selected to:", :class => "btn btn-info", :name => "translate") %>
    <%= select_tag(:ontology_ids, grouped_options_for_select(@ontology_groups)) %>
  </div>
</div>

<table class="table table-striped table-bordered">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Elements</th>
      <th>Ontology</th>
      <th>Actions</th>
    </tr>
  </thead>

  <tbody>

  <% @pattern_groups.each_pair do |tag, patterns| %>
    <% next if patterns.empty? %>
    <tr class="info">
      <td colspan="5"><strong><%= tag %></strong> (<%= patterns.size%>)</td>
    </tr>
    <% patterns.each do |pattern|%>
      <tr>
        <td>
          <label class="checkbox">
            <%= check_box_tag("patterns[]", pattern.id)%><%= link_to(pattern.name, pattern_path(pattern)) %>
          </label>
        </td>
        <td class="span8"><%= pattern.description %></td>
        <td><%= pattern.pattern_elements.size %></td>
        <td><%= pattern.ontologies.collect{|ont| ont.short_name}.join(", ") %>
        <td>
          <%= link_to("Query", pattern_query_path(pattern), :class => "btn btn-success btn-mini") %>
          <%= link_to(
            "Delete",
            pattern_path(pattern),
            :method => :delete,
            :class => "btn btn-danger btn-mini",
            :confirm => "Really delete #{pattern.name}?")
          %>
        </td>
      </tr>
    <% end %>
  <% end %>
  </tbody>
</table>
<% end %><commit_msg>Removed some visual noise<commit_after><%= form_tag(transmogrify_patterns_path) do %>

<div class="btn-toolbar">
  <div class="btn-group">
    <%= link_to "New Pattern", new_pattern_path, :class => "btn btn-success"%>
  </div>
  <div class="btn-group left-boarder">
    <%= button_tag("Monitor selected on:", :class => "btn btn-warning", :name => "monitor") %>
    <%= select_tag("repository_id", options_from_collection_for_select(@repositories, "id", "name")) %>
  </div>
  <div class="btn-group left-boarder">
    <%= button_tag("Translate selected to:", :class => "btn btn-info", :name => "translate") %>
    <%= select_tag(:ontology_ids, grouped_options_for_select(@ontology_groups)) %>
  </div>
</div>

<table class="table table-striped table-bordered">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Ontology</th>
      <th></th>
    </tr>
  </thead>

  <tbody>

  <% @pattern_groups.each_pair do |tag, patterns| %>
    <% next if patterns.empty? %>
    <tr class="info">
      <td colspan="5"><strong><%= tag %></strong> (<%= patterns.size%>)</td>
    </tr>
    <% patterns.each do |pattern|%>
      <tr>
        <td>
          <label class="checkbox">
            <%= check_box_tag("patterns[]", pattern.id)%><%= link_to(pattern.name, pattern_path(pattern)) %>
          </label>
        </td>
        <td class="span8"><%= pattern.description %></td>
        <td><%= pattern.ontologies.collect{|ont| ont.short_name}.join(", ") %>
        <td>
          <%= link_to(
            "Delete",
            pattern_path(pattern),
            :method => :delete,
            :class => "btn btn-danger btn-mini",
            :confirm => "Really delete #{pattern.name}?")
          %>
        </td>
      </tr>
    <% end %>
  <% end %>
  </tbody>
</table>
<% end %>
{'fraction_non_alphanumeric': 0.20642933049946866, 'fraction_numerical': 0.0010626992561105207, 'mean_word_length': 2.7915407854984893, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 146, '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': '2469951', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1261, 'n_words': 243}