<commit_before>=render({ :partial => '/shared/page_tabs', :locals => { :selected => 3, :page_id => @page.id }})

.headline
  h2.headline_title Uncategorized Subjects
  -if user_signed_in? && current_user.like_owner?(@collection)
    .headline_aside
      =link_to 'Manage Categories', { :controller => 'article', :action => 'list', :page_id => @page.id }, class: 'button'

p.big You have uncategorized subjects mentioned in the page transcription. Please review the subjects below and assign the appropriate categories for them.

-@page.articles.distinct.each do |article|
  -if article.categories.length == 0
    -update_article_url = url_for({ :controller => 'article', :action => 'article_category', :article_id => article.id })
    .page-uncategorized
      h4.page-uncategorized_subject(data-prefix="Subject: " *language_attrs(@collection)) =="&ldquo;#{article.title}&rdquo;"
      code= highlight(excerpt(@page.source_text.gsub("\n", "<br />"), article.title, separator: "<br />", radius: 3), article.title)
      select(data-assign-categories="#{update_article_url}" size="1" aria-label="Assign categories" multiple)
        -@collection.categories.walk_tree do |c, level|
          -selected = true if article.categories.include?(c)
          option(data-level=level value=c.id selected=selected aria-label="options" *language_attrs(@collection)) =c.title

span.legend
  -if @translation
    -next_path = collection_translate_page_path(@collection.owner, @collection, @work, @page.id)
  -else
    -next_path =collection_transcribe_page_path(@collection.owner, @collection, @work, @page.id)
  =link_to 'Continue', next_path, class: 'button outline round'<commit_msg>Don't blow up if we can't find the subject title in the text<commit_after>=render({ :partial => '/shared/page_tabs', :locals => { :selected => 3, :page_id => @page.id }})

.headline
  h2.headline_title Uncategorized Subjects
  -if user_signed_in? && current_user.like_owner?(@collection)
    .headline_aside
      =link_to 'Manage Categories', { :controller => 'article', :action => 'list', :page_id => @page.id }, class: 'button'

p.big You have uncategorized subjects mentioned in the page transcription. Please review the subjects below and assign the appropriate categories for them.

-@page.articles.distinct.each do |article|
  -if article.categories.length == 0
    -update_article_url = url_for({ :controller => 'article', :action => 'article_category', :article_id => article.id })
    .page-uncategorized
      h4.page-uncategorized_subject(data-prefix="Subject: " *language_attrs(@collection)) =="&ldquo;#{article.title}&rdquo;"
      -ex=excerpt(@page.source_text.gsub("\n", "<br />"), article.title, separator: "<br />", radius: 3)
      -if ex.blank?
        =article.title
      -else
        code= highlight(ex, article.title)
      select(data-assign-categories="#{update_article_url}" size="1" aria-label="Assign categories" multiple)
        -@collection.categories.walk_tree do |c, level|
          -selected = true if article.categories.include?(c)
          option(data-level=level value=c.id selected=selected aria-label="options" *language_attrs(@collection)) =c.title

span.legend
  -if @translation
    -next_path = collection_translate_page_path(@collection.owner, @collection, @work, @page.id)
  -else
    -next_path =collection_transcribe_page_path(@collection.owner, @collection, @work, @page.id)
  =link_to 'Continue', next_path, class: 'button outline round'
{'fraction_non_alphanumeric': 0.147848686110309, 'fraction_numerical': 0.0034652035807103665, 'mean_word_length': 4.632520325203252, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, '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': '7652374', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1061, 'n_words': 248}