<commit_before>'use strict';

function JargonBuster(){
  var that = this;
  this.getDictionary(function(dict){
    that.dictionary = dict;
    var tags = that.findTextBlocks();
    that.findJargon( tags, dict );
  });
}

JargonBuster.prototype.getDictionary = function(callback){
  var url = chrome.extension.getURL('/dictionary.json');
  $.getJSON( url, callback );
}

JargonBuster.prototype.findTextBlocks = function(){
  return $('p');
}

JargonBuster.prototype.findJargon = function($tags, dict){
  // console.log(tags);
    for (var j = 0; j < dict.length; j++) {
      var term = dict[j].term;
      // console.log( tags[i], tags[i].innerText);
      var withTag = '<span class="jargon-buster-term">'+term+'</span>';
      
      var punc = [' ',',','.','\'','"','“','‘','’','”','-','—',';',':','(',')'];
      
      $tags.html(function () {<commit_msg>Cleanup<commit_after>'use strict';

function JargonBuster(){
  var that = this;
  this.getDictionary(function(dict){
    that.dictionary = dict;
    var tags = that.findTextBlocks();
    that.findJargon( tags, dict );
  });
}

JargonBuster.prototype.getDictionary = function(callback){
  var url = chrome.extension.getURL('/dictionary.json');
  $.getJSON( url, callback );
}

JargonBuster.prototype.findTextBlocks = function(){
  return $('p');
}

JargonBuster.prototype.findJargon = function($tags, dict){
    for (var j = 0; j < dict.length; j++) {
      var term = dict[j].term;
      var withTag = '<span class="jargon-buster-term">'+term+'</span>';
      $tags.html(function () {
{'fraction_non_alphanumeric': 0.202720207253886, 'fraction_numerical': 0.0012953367875647669, 'mean_word_length': 3.798136645962733, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '2106174', 'n_tokens_mistral': 537, 'n_tokens_neox': 528, 'n_words': 99}