<commit_before><%= render :partial => 'docs/path' -%>

<% if @denotations.present? -%>
	<% denotation_groups = Array.new -%>
	<% span_ids = Array.new -%>
	<% @doc_body = @doc.body -%>
	<% @doc_anc = @doc.body -%>
	<% @denotations.each do | denotation | -%>
		<% span_text = Doc.find(@doc.id).body[denotation[:span][:begin]...denotation[:span][:end]]%>
		<% @doc_anc.sub!("#{span_text}", "<a href='#{denotation[:span][:begin]}-#{denotation[:span][:end]}'>#{span_text}</a>") -%>
	<% end -%>
	<table>
		<tr>
			<th>
				<%= @doc.sourcedb %>:<%= link_to @doc.sourceid, @doc.source %>
			</th>
		</tr>
		<tr>
			<td>
				<%= @doc.body.html_safe -%>
			</td>
		</tr>
	</table>
	<% @denotations.each do | denotation | -%>
		<% denotation_group = @denotations.select{|other_denotation| other_denotation[:span][:begin] >= denotation[:span][:begin] && other_denotation[:span][:begin] <= denotation[:span][:end] && other_denotation[:span][:end] <= denotation[:span][:end] } -%>
		<% span_ids << denotation_group.collect{|dg| dg[:id]}%>
		<% denotation_groups << denotation_group if span_ids.include?(denotation[:id]) == false -%>
	<% end -%>
	<% denotation_groups.each do |denotation_group| -%>
		<% denotation_group.each do |span| -%>
			<%#= span_text = @doc.body[span[:span][:begin]...span[:span][:end]] -%>
		<% end %>
	<% end -%>
	<table>
		<tr>
			<th>
				Span
			</th>
		</tr>
		<% @denotations.each do | denotation | -%>
			<tr>
				<td>
					<%= spans_link_helper(denotation) -%>
				</td>
			</tr>
		<% end -%>
	</table>
<% end -%><commit_msg>Deleted docs#span doc.body table<commit_after><%= render :partial => 'docs/path' -%>

<% if @denotations.present? -%>
	<table>
		<tr>
			<th>
				Span
			</th>
		</tr>
		<% @denotations.each do | denotation | -%>
			<tr>
				<td>
					<%= spans_link_helper(denotation) -%>
				</td>
			</tr>
		<% end -%>
	</table>
<% end -%>
{'fraction_non_alphanumeric': 0.2569593147751606, 'fraction_numerical': 0.0, 'mean_word_length': 3.5254237288135593, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 71, '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': '5431469', 'n_tokens_mistral': 918, 'n_tokens_neox': 805, 'n_words': 111}