<commit_before>
// Templates
var sdTemplate = '' +
	'<table class="stackdoc">' +
	'{{#questions}}' +
	'	<tr>' +
	'		<td><span class="sd_score {{#accepted_answer}}sd_accepted{{/accepted_answer}}">{{score}}</span></td>' +
	'		<td class="stackdoc-question-title"><a href="{{url}}" title="{{answers}} answers{{#accepted_answer}}, with one accepted answer{{/accepted_answer}}">{{title}}</a></td>' +
	'	</tr>' +
	'{{/questions}}' +
	'</table>';
var msdnSurrounding = '' +
	'<div class="cl_lw_vs_seperator" style="display: block; "></div>' +
	'<div id="stackdoc-title">' +
	'	{{count}} Stack Overflow questions' +
	'</div>';

var className = $('link[rel="canonical"]').attr('href');
// Remove the hostname and first part of the path.
className = className.replace(/^.*\//, "");
// Remove the aspx extension and optional bits on the end of the class name like "_events".
className = className.replace(/(_[a-z]+)?\.aspx$/, "");

var shortId = $('meta[name="Search.ShortId"]').attr('content');

function url(language, id) {
	return "http://stackdocapi.alnorth.com/1/" + encodeURIComponent(language) + "/" + encodeURIComponent(id);
}

function compareQuestions(a, b) {
	return b.score - a.score;
}

$.getJSON(url("dotnet", className), function(data) {
	data.sort(compareQuestions);
	var sdText = Mustache.render(sdTemplate, {questions: data}),
		fullText = Mustache.render(msdnSurrounding, {count: data.length}),
		$sd = $(fullText),
		$sdTitle = $($.grep($sd, function(x) { return x.id === "stackdoc-title"; })[0]);

	if(data.length > 0) {
		$sdTitle.popover({
			content: sdText,
			classes: "large"
		}).addClass("clickable");
	}

	$sd.insertAfter($("#vsPanel"));
});<commit_msg>No plural for single SO question.<commit_after>
// Templates
var sdTemplate = '' +
	'<table class="stackdoc">' +
	'{{#questions}}' +
	'	<tr>' +
	'		<td><span class="sd_score {{#accepted_answer}}sd_accepted{{/accepted_answer}}">{{score}}</span></td>' +
	'		<td class="stackdoc-question-title"><a href="{{url}}" title="{{answers}} answers{{#accepted_answer}}, with one accepted answer{{/accepted_answer}}">{{title}}</a></td>' +
	'	</tr>' +
	'{{/questions}}' +
	'</table>';
var msdnSurrounding = '' +
	'<div class="cl_lw_vs_seperator" style="display: block; "></div>' +
	'<div id="stackdoc-title">' +
	'	{{count}} Stack Overflow question{{^count_is_one}}s{{/count_is_one}}' +
	'</div>';

var className = $('link[rel="canonical"]').attr('href');
// Remove the hostname and first part of the path.
className = className.replace(/^.*\//, "");
// Remove the aspx extension and optional bits on the end of the class name like "_events".
className = className.replace(/(_[a-z]+)?\.aspx$/, "");

var shortId = $('meta[name="Search.ShortId"]').attr('content');

function url(language, id) {
	return "http://stackdocapi.alnorth.com/1/" + encodeURIComponent(language) + "/" + encodeURIComponent(id);
}

function compareQuestions(a, b) {
	return b.score - a.score;
}

$.getJSON(url("dotnet", className), function(data) {
	data.sort(compareQuestions);
	var sdText = Mustache.render(sdTemplate, {questions: data}),
		fullText = Mustache.render(msdnSurrounding, {count: data.length, count_is_one: data.length === 1}),
		$sd = $(fullText),
		$sdTitle = $($.grep($sd, function(x) { return x.id === "stackdoc-title"; })[0]);

	if(data.length > 0) {
		$sdTitle.popover({
			content: sdText,
			classes: "large"
		}).addClass("clickable");
	}

	$sd.insertAfter($("#vsPanel"));
});
{'fraction_non_alphanumeric': 0.2295129775444736, 'fraction_numerical': 0.002041411490230388, 'mean_word_length': 5.247723132969035, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, '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': '1178010', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1209, 'n_words': 240}