<commit_before>/*!
  * typogr.js
  * Copyright(c) 2011 <NAME>
  * MIT Licensed
  */(function(a){var b=function(a){return new o(a)};b.version="0.4.0",typeof module!="undefined"&&module.exports?module.exports=b:a.typogr=b;var c=function(a,b){return new RegExp(a,b)},d=b.amp=function(a){var b=/(\s|&nbsp;)(&|&amp;|&\#38;)(\s|&nbsp;)/g,c=/(<[^<]*>)?([^<]*)(<\/[^<]*>)?/g;if(!!a)return a.replace(c,function(a,c,d,e){var c=c||"",e=e||"",d=d.replace(b,'$1<span class="amp">&amp;</span>$3');return c+d+e})},e=b.ord=function(a){var b=/(\d+)(st|nd|rd|th)/g;if(!!a)return a.replace(b,'$1<span class="ord">$2</span>')},f=b.quotes=function(a){var b=c("(?:(?:<(?:p|h[1-6]|li|dt|dd)[^>]*>|^)\\s*(?:<(?:a|em|span|strong|i|b)[^>]*>s*)*)(?:(\"|&ldquo;|&#8220;)|('|&lsquo;|&#8216;))","i");if(!!a)return a.replace(b,function(a,b,c){var d=b?"dquo":"quo",e=b?b:c;return[a.slice(0,a.lastIndexOf(e)),'<span class="',d,'">',e,"</span>"].join("")})},g=b.widont=function(a){var b=c("((?:</?(?:a|em|span|strong|i|b)[^>]*>)|[^<>\\s])\\s+([^<>\\s]+\\s*(</(a|em|span|strong|i|b)>\\s*)*((</(p|h[1-6]|li|dt|dd)>)|$))","gi");return a.replace(b,"$1&nbsp;$2")};b.typogrify=function(a){a=d(a),a=g(a),a=h(a),a=f(a),a=e(a);return a};var h=b.smartypants=function(a){var b=i(a),c=[],d=/<(\/)?(pre|code|kbd|script|math)[^>]*>/i,e=[],f="",g="",h=!1,o="",p,q;b.forEach(function(a){if(a.type==="tag")c.push(a.txt),(g=d.exec(a.txt))!=null&&(f=g[2].toLowerCase(),g[1]?(e.length>0&&f===e[-1]&&e.pop(),e.length===0&&(h=!1)):(e.push(f),h=!0));else{q=a.txt,p=q.slice(-1);if(!h){q=j(q),q=k(q),q=l(q),q=m(q);switch(q){case"'":/\S/.test(o)?q="&#8217;":q="&#8216;";break;case'"':/\S/.test(o)?q="&#8221;":q="&#8220;";break;default:q=n(q)}}o=p,c.push(q)}});return c.join("")},i=b.tokenize=function(a){var b=[],c=0,d=/([^<]*)(<[^>]*>)/gi,e;while((e=d.exec(a))!=null){var f=e[1],g=e[2];f&&b.push({type:"text",txt:f}),b.push({type:"tag",txt:g}),c=d.lastIndex}d.lastIndex<=a.length&&b.push({type:"text",txt:a.slice(c)});return b},j=b.smartEscapes=function(a){return a.replace(/\\"/g,"&#34;").replace(/\\'/g,"&#39;").replace(/\\-/g,"&#45;").replace(/\\\./g,"&#46;").replace(/\\\\/g,"&#92;").replace(/\\`/g,"&#96;")},k=b.smartDashes=function(a){return a.replace(/---/g,"&#8211;").replace(/--/g,"&#8212;")},l=b.smartEllipses=function(a){return a.replace(/\.\.\./g,"&#8230;").replace(/\. \. \./g,"&#8230;")},m=b.smartBackticks=function(a){return a.replace(/``/g,"&#8220;").replace(/''/g,"&#8221;")},n=b.smartQuotes=function(a){var b="[!\"#$%'()*+,-./:;<=>?@[\\]^_`{|}~]",d="(?=%s\\B)".replace("%s",b),e="[^ \t\r\n[{(-]",f="&#8211;|&#8212;",g=c("(s|&nbsp;|--|&[mn]dash;|"+f+"|"+"&#x201[34];"+")"+"'"+"(?=w)","g"),h=c("("+e+")"+"'"+"(?!s | s\b | d)","g"),i=c("("+e+")"+"'"+"(?!s | s\b)","g"),j=c("(s|&nbsp;|--|&[mn]dash;|"+f+"|"+"&#x201[34];"+")"+'"'+"(?=w)","g"),k=c('"(?=s)',"g"),l=c("("+e+')"',"g");return a.replace(c("^'%s".replace("%s",d),"g"),"&#8217;").replace(c('^"%s'.replace("%s",d),"g"),"&#8221;").replace(/"'(?=\w)/g,"&#8220;&#8216;").replace(/'"(?=\w)/g,"&#8216;&#8220;").replace(/\b'(?=\d{2}s)/g,"&#8217;").replace(g,"$1&#8216;").replace(h,"$1&#8217;").replace(i,"$1&#8217;$2").replace("'","&#8216;").replace(j,"$1&#8220;").replace(k,"&#8221;").replace(l,"$1&#8221;").replace('"',"&#8220;")},o=function(a){this._wrapped=a},p=function(a,c){return c?b(a).chain():a},q=function(a,c){o.prototype[a]=function(){return p(c.apply(b,[this._wrapped]),this._chain)}},r=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};for(var s in b)r(b[s])&&q(s,b[s]);o.prototype.chain=function(){this._chain=!0;return this},o.prototype.value=function(){return this._wrapped}})(this)<commit_msg>minify js<commit_after>/*!
  * typogr.js
  * Copyright(c) 2011 <NAME>
  * MIT Licensed
  */(function(a){var b=function(a){return new o(a)};b.version="0.4.1",typeof module!="undefined"&&module.exports?module.exports=b:a.typogr=b;var c=function(a,b){return new RegExp(a,b)},d=b.amp=function(a){var b=/(\s|&nbsp;)(&|&amp;|&\#38;)(\s|&nbsp;)/g,c=/(<[^<]*>)?([^<]*)(<\/[^<]*>)?/g;if(!!a)return a.replace(c,function(a,c,d,e){var c=c||"",e=e||"",d=d.replace(b,'$1<span class="amp">&amp;</span>$3');return c+d+e})},e=b.ord=function(a){var b=/(\d+)(st|nd|rd|th)/g;if(!!a)return a.replace(b,'$1<span class="ord">$2</span>')},f=b.quotes=function(a){var b=c("(?:(?:<(?:p|h[1-6]|li|dt|dd)[^>]*>|^)\\s*(?:<(?:a|em|span|strong|i|b)[^>]*>s*)*)(?:(\"|&ldquo;|&#8220;)|('|&lsquo;|&#8216;))","i");if(!!a)return a.replace(b,function(a,b,c){var d=b?"dquo":"quo",e=b?b:c;return[a.slice(0,a.lastIndexOf(e)),'<span class="',d,'">',e,"</span>"].join("")})},g=b.widont=function(a){var b=c("((?:</?(?:a|em|span|strong|i|b)[^>]*>)|[^<>\\s])\\s+([^<>\\s]+\\s*(</(a|em|span|strong|i|b)>\\s*)*((</(p|h[1-6]|li|dt|dd)>)|$))","gi");return a.replace(b,"$1&nbsp;$2")};b.typogrify=function(a){a=d(a),a=g(a),a=h(a),a=f(a),a=e(a);return a};var h=b.smartypants=function(a){var b=i(a),c=[],d=/<(\/)?(pre|code|kbd|script|math)[^>]*>/i,e=[],f="",g="",h=!1,o="",p,q;b.forEach(function(a){if(a.type==="tag")c.push(a.txt),(g=d.exec(a.txt))!=null&&(f=g[2].toLowerCase(),g[1]?(e.length>0&&f===e[-1]&&e.pop(),e.length===0&&(h=!1)):(e.push(f),h=!0));else{q=a.txt,p=q.slice(-1);if(!h){q=j(q),q=k(q),q=l(q),q=m(q);switch(q){case"'":/\S/.test(o)?q="&#8217;":q="&#8216;";break;case'"':/\S/.test(o)?q="&#8221;":q="&#8220;";break;default:q=n(q)}}o=p,c.push(q)}});return c.join("")},i=b.tokenize=function(a){var b=[],c=0,d=/([^<]*)(<[^>]*>)/gi,e;while((e=d.exec(a))!=null){var f=e[1],g=e[2];f&&b.push({type:"text",txt:f}),b.push({type:"tag",txt:g}),c=d.lastIndex}d.lastIndex<=a.length&&b.push({type:"text",txt:a.slice(c)});return b},j=b.smartEscapes=function(a){return a.replace(/\\"/g,"&#34;").replace(/\\'/g,"&#39;").replace(/\\-/g,"&#45;").replace(/\\\./g,"&#46;").replace(/\\\\/g,"&#92;").replace(/\\`/g,"&#96;")},k=b.smartDashes=function(a){return a.replace(/---/g,"&#8211;").replace(/--/g,"&#8212;")},l=b.smartEllipses=function(a){return a.replace(/\.\.\./g,"&#8230;").replace(/\. \. \./g,"&#8230;")},m=b.smartBackticks=function(a){return a.replace(/``/g,"&#8220;").replace(/''/g,"&#8221;")},n=b.smartQuotes=function(a){var b="[!\"#$%'()*+,-./:;<=>?@[\\]^_`{|}~]",d="(?=%s\\B)".replace("%s",b),e="[^ \t\r\n[{(-]",f="&#8211;|&#8212;",g=c("(s|&nbsp;|--|&[mn]dash;|"+f+"|"+"&#x201[34];"+")"+"'"+"(?=w)","g"),h=c("("+e+")"+"'"+"(?!s | s\b | d)","g"),i=c("("+e+")"+"'"+"(?!s | s\b)","g"),j=c("(s|&nbsp;|--|&[mn]dash;|"+f+"|"+"&#x201[34];"+")"+'"'+"(?=w)","g"),k=c('"(?=s)',"g"),l=c("("+e+')"',"g");return a.replace(c("^'%s".replace("%s",d),"g"),"&#8217;").replace(c('^"%s'.replace("%s",d),"g"),"&#8221;").replace(/"'(?=\w)/g,"&#8220;&#8216;").replace(/'"(?=\w)/g,"&#8216;&#8220;").replace(/\b'(?=\d{2}s)/g,"&#8217;").replace(g,"$1&#8216;").replace(h,"$1&#8217;").replace(i,"$1&#8217;$2").replace("'","&#8216;").replace(j,"$1&#8220;").replace(k,"&#8221;").replace(l,"$1&#8221;").replace('"',"&#8220;")},o=function(a){this._wrapped=a},p=function(a,c){return c?b(a).chain():a},q=function(a,c){o.prototype[a]=function(){return p(c.apply(b,[this._wrapped]),this._chain)}},r=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};for(var s in b)r(b[s])&&q(s,b[s]);o.prototype.chain=function(){this._chain=!0;return this},o.prototype.value=function(){return this._wrapped}})(this)
{'fraction_non_alphanumeric': 0.45168415240198784, 'fraction_numerical': 0.049144119271120924, 'mean_word_length': 11.115384615384615, 'pattern_counts': {'":': 8, '<': 51, '<?xml version=': 0, '>': 53, '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': '2793928', 'n_tokens_mistral': 3851, 'n_tokens_neox': 3607, 'n_words': 108}