<commit_before><p id="notice"><%= notice %></p>

<p>
  <strong>Name:</strong>
  <%= @sub_reddit.name %>
</p>

<p>
  <strong>Url:</strong>
  <%= @sub_reddit.url %>
</p>

<p>
  <strong>Document:</strong>
  <%= @sub_reddit.document %>
</p>

<p>
  <strong>Bag of words:</strong>
  <%= @sub_reddit.bag_of_words %>
</p>


<strong>Word Cloud:</strong>
<div id="example" style="width: 700px; height: 350px"></div>

<p>
  <strong>Latest Snapshot:</strong>
  <%= @sub_reddit.updated_at %>
</p>
<table class ='table table-striped'>
  <thead>
    <tr>
      <th class='sub-reddit'>Sub reddit</th>
      <th class='sub-reddit'>Weight</th>
      <th class='sub-reddit'>Sub reddit relation</th>
      <th colspan="3"></th>
    </tr>
  </thead>
  <% if @sub_reddit.all_related_subreddit_relations.first && @sub_reddit.related_sub_reddits.count > 0 %>
    <tbody>
      <% @sub_reddit.all_related_subreddit_relations.reverse.each do |related_sub_reddit| %>
        <tr>
          <td><%= link_to related_sub_reddit.sub_reddit.name, related_sub_reddit.sub_reddit  %></td>
          <td><div class="progress">
              <div class="progress-bar" role="progressbar" data-transitiongoal="<%= related_sub_reddit.weight*100 %>"></div>
              </div>
          </td>
          <td><%= link_to related_sub_reddit.sub_reddit_relation.name, related_sub_reddit.sub_reddit_relation  %></td>
          <!-- <td><%= link_to 'Show', related_sub_reddit %></td> -->
          <td><%= link_to 'Edit', edit_related_sub_reddit_path(related_sub_reddit) %></td>
          <td><%= link_to 'Destroy', related_sub_reddit, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <% end %>
<%= link_to 'Edit', edit_sub_reddit_path(@sub_reddit) %> |
<%= link_to 'Back', sub_reddits_path %>

<script type="text/javascript">
     /*!
      * Create an array of word objects, each representing a word in the cloud
      */

     var word_array =
       <%= raw @bag_of_words_word_list.to_json %>;

     $(function() {
       // When DOM is ready, select the container element and call the jQCloud method, passing the array of words as the first argument.
       $("#example").jQCloud(word_array);
     });
</script>
<commit_msg>app/views/sub_reddits/show.html.erb, ln 69: jQuery<commit_after><p id="notice"><%= notice %></p>

<p>
  <strong>Name:</strong>
  <%= @sub_reddit.name %>
</p>

<p>
  <strong>Url:</strong>
  <%= @sub_reddit.url %>
</p>

<p>
  <strong>Document:</strong>
  <%= @sub_reddit.document %>
</p>

<p>
  <strong>Bag of words:</strong>
  <%= @sub_reddit.bag_of_words %>
</p>


<strong>Word Cloud:</strong>
<div id="example" style="width: 700px; height: 350px"></div>

<p>
  <strong>Latest Snapshot:</strong>
  <%= @sub_reddit.updated_at %>
</p>
<table class ='table table-striped'>
  <thead>
    <tr>
      <th class='sub-reddit'>Sub reddit</th>
      <th class='sub-reddit'>Weight</th>
      <th class='sub-reddit'>Sub reddit relation</th>
      <th colspan="3"></th>
    </tr>
  </thead>
  <% if @sub_reddit.all_related_subreddit_relations.first && @sub_reddit.related_sub_reddits.count > 0 %>
    <tbody>
      <% @sub_reddit.all_related_subreddit_relations.reverse.each do |related_sub_reddit| %>
        <tr>
          <td><%= link_to related_sub_reddit.sub_reddit.name, related_sub_reddit.sub_reddit  %></td>
          <td><div class="progress">
              <div class="progress-bar" role="progressbar" data-transitiongoal="<%= related_sub_reddit.weight*100 %>"></div>
              </div>
          </td>
          <td><%= link_to related_sub_reddit.sub_reddit_relation.name, related_sub_reddit.sub_reddit_relation  %></td>
          <!-- <td><%= link_to 'Show', related_sub_reddit %></td> -->
          <td><%= link_to 'Edit', edit_related_sub_reddit_path(related_sub_reddit) %></td>
          <td><%= link_to 'Destroy', related_sub_reddit, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <% end %>
<%= link_to 'Edit', edit_sub_reddit_path(@sub_reddit) %> |
<%= link_to 'Back', sub_reddits_path %>

<script type="text/javascript">
     /*!
      * Create an array of word objects, each representing a word in the cloud
      */

     var word_array =
       <%= raw @bag_of_words_word_list.to_json %>;

     $(document).ready(function() {
       // When DOM is ready, select the container element and call the jQCloud method, passing the array of words as the first argument.
       $("#example").jQCloud(word_array);
     });
</script>

{'fraction_non_alphanumeric': 0.1831759279595871, 'fraction_numerical': 0.005271249725455744, 'mean_word_length': 3.280075187969925, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 169, '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': '6326208', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1636, 'n_words': 323}