<commit_before><h1>キーワード分析 <%= @keyword_set.name %></h1>

<% if @keyword_set.working? %>
  <p>現在、集計中のため少々お待ち下さい。</p>
<% else %>
  <div class="panel panel-default">
    <div class="panel-heading">
      集計結果 (<%= @keyword_set.analysed_at.strftime('%Y/%m/%d %H:%M:%S %A') %>)
    </div>
    <div class="panel-body">
      <%= render 'summary_tab' %>
    </div>
  </div>

  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">詳細</h3>
    </div>
    <div class="panel-body">
      <ul>
        <% @keyword_set.keywords.each do |k| %>
        <li><%= k.name %></li>
        <ul>
          <% k.results.each do |r| %>
            <li><%= r.position %>:<%= link_to r.title, r.url %> (<%= r.domain %>)</li>
          <% end %>
        </ul>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>

<%= link_to '戻る', keyword_sets_path, class: 'btn btn-default' %>
<%= link_to '再分析', @keyword_set, class: 'btn btn-primary', method: :patch %><commit_msg>show results order by position asc<commit_after><h1>キーワード分析 <%= @keyword_set.name %></h1>

<% if @keyword_set.working? %>
  <p>現在、集計中のため少々お待ち下さい。</p>
<% else %>
  <div class="panel panel-default">
    <div class="panel-heading">
      集計結果 (<%= @keyword_set.analysed_at.strftime('%Y/%m/%d %H:%M:%S %A') %>)
    </div>
    <div class="panel-body">
      <%= render 'summary_tab' %>
    </div>
  </div>

  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">詳細</h3>
    </div>
    <div class="panel-body">
      <ul>
        <% @keyword_set.keywords.each do |k| %>
        <li><%= k.name %></li>
        <ul>
          <% k.results.order(:position).each do |r| %>
            <li><%= r.position %>:<%= link_to r.title, r.url %> (<%= r.domain %>)</li>
          <% end %>
        </ul>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>

<%= link_to '戻る', keyword_sets_path, class: 'btn btn-default' %>
<%= link_to '再分析', @keyword_set, class: 'btn btn-primary', method: :patch %>
{'fraction_non_alphanumeric': 0.23564356435643563, 'fraction_numerical': 0.0039603960396039604, 'mean_word_length': 2.5518453427065024, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '7037521', 'n_tokens_mistral': 879, 'n_tokens_neox': 815, 'n_words': 149}