<commit_before><%# default partial to display solr document fields in catalog index view -%>
<dl class="dl-horizontal dl-invert">

  <% index_fields.each do |solr_fname, field| -%> 
    <% if should_render_index_field? document, field %>
       <% if not((field.label == "Library") || (field.label == "Call no")) %>
	      <dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label :field => solr_fname %></dt>
	      <dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_value :document => document, :field => solr_fname %></dd>
        <% end -%>
    <% end -%>
  <% end -%>
  <% if document.is_archival_collection? %>
  <dt>Table of Contents:</dt>
    <%= link_to_toc_page document, "Descriptive Summary", "abstract" %>
    <%= link_to_toc_page document, "Historical/Biographical Note", "bioghist" %>
    <%= link_to_toc_page document, "Scope and Content Note and Arrangement", "scopecontent" %>
    <%= link_to_toc_page document, "Access Points", "controlaccess" %>
    <%= link_to_toc_page document, "Administrative Information", "admininfo" %>
  <dt>Archival Items:</dt>
    <dd><b><%= link_to "Click here to search within collection", render_components_facet_link(document) %></b></dd>
  <% elsif document.is_archival_series? %>
  <dt>Archival Items:</dt>
    <dd><b><%= link_to "Click here to search within series", render_components_for_series_facet_link(document) %></b></dd>
  <% end %>
  <!-- need to create a function for this -->
  <% index_fields.each do |solr_fname, field| -%> 
    <% if should_render_index_field? document, field %>
    <% if ((field.label == "Library") || (field.label == "Call no")) %>
        <dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label :field => solr_fname %></dt>
        <dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_value :document => document, :field => solr_fname %></dd>
        <% end -%>
    <% end -%>
  <% end -%><commit_msg>added truncation for abstract display to 450 characters<commit_after><%# default partial to display solr document fields in catalog index view -%>
<dl class="dl-horizontal dl-invert">

  <% index_fields.each do |solr_fname, field| -%> 
    <% if should_render_index_field? document, field %>
       <% if not((field.label == "Library") || (field.label == "Call no")) %>
	      <dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label :field => solr_fname %></dt>
	      <dd class="blacklight-<%= solr_fname.parameterize %>">
          <% if field.label == "Abstract" %>
            <% abstract = render_index_field_value :document => document, :field => solr_fname %>
            <%= truncate abstract, length:450 %>
          <% else %>
             <%= render_index_field_value :document => document, :field => solr_fname %>
          <% end -%>
        </dd>
       
        <% end -%>
    <% end -%>
  <% end -%>
  <% if document.is_archival_collection? %>
  <dt>Table of Contents:</dt>
    <%= link_to_toc_page document, "Descriptive Summary", "abstract" %>
    <%= link_to_toc_page document, "Historical/Biographical Note", "bioghist" %>
    <%= link_to_toc_page document, "Scope and Content Note and Arrangement", "scopecontent" %>
    <%= link_to_toc_page document, "Access Points", "controlaccess" %>
    <%= link_to_toc_page document, "Administrative Information", "admininfo" %>
  <dt>Archival Items:</dt>
    <dd><b><%= link_to "Click here to search within collection", render_components_facet_link(document) %></b></dd>
  <% elsif document.is_archival_series? %>
  <dt>Archival Items:</dt>
    <dd><b><%= link_to "Click here to search within series", render_components_for_series_facet_link(document) %></b></dd>
  <% end %>
  <!-- need to create a function for this -->
  <% index_fields.each do |solr_fname, field| -%> 
    <% if should_render_index_field? document, field %>
    <% if ((field.label == "Library") || (field.label == "Call no")) %>
        <dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label :field => solr_fname %></dt>
        <dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_value :document => document, :field => solr_fname %></dd>
        <% end -%>
    <% end -%>
  <% end -%>
{'fraction_non_alphanumeric': 0.1750990906971322, 'fraction_numerical': 0.0013989274889251574, 'mean_word_length': 3.902857142857143, 'pattern_counts': {'":': 0, '<': 118, '<?xml version=': 0, '>': 132, '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': '4613988', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1379, 'n_words': 319}