<commit_before>var SpanCreatorTaskSuggestor = function(availableList, taskList) {
  
  var spans;

  var init = function() {
    addBehavior();
  };

  var addBehavior = function() {
    App.dispatcher.subscribe('DATE_CHANGED', onDateChanged);
    App.dispatcher.subscribe('SPAN_SAVED', onSpanSaved);
    App.dispatcher.subscribe('SPAN_DELETED', onSpanDeleted);
    App.dispatcher.subscribe('SPAN_CHANGED', updateSpansAvailable);// SPAMMY
  };

  var onDateChanged = function(date) {
    spans = date.spans;
    updateSpansAvailable();
  };

  var onSpanSaved = function(data) {
    spans = data.record.spans;
    updateSpansAvailable();
  };

  var onSpanDeleted = function(data) {
    spans = data.record.spans;
    updateSpansAvailable();
  };

  var addAvailableTask = function() {
    taskList.addTask(this.innerText);
    updateSpansAvailable();
  };

  var updateSpansAvailable = function() {
    availableList.empty();

    if (spans === undefined)
      return;

    buildUnassignedTasks(spans).forEach(task => {
      console.log(task);
      const item = jQuery('<li></li>');
      item.append(task);
      item.click(addAvailableTask);
      availableList.append(item);
    });
  };

  var buildUnassignedTasks = function() {
    var allTasks = [];
    Object.entries(spans).forEach(span => {
      allTasks = [...allTasks, ...span[1].tasks];
    });

    const uniqueTasks = allTasks.filter((task, index) => {
      return allTasks.indexOf(task) === index;<commit_msg>Removing console logs.<commit_after>var SpanCreatorTaskSuggestor = function(availableList, taskList) {
  
  var spans;

  var init = function() {
    addBehavior();
  };

  var addBehavior = function() {
    App.dispatcher.subscribe('DATE_CHANGED', onDateChanged);
    App.dispatcher.subscribe('SPAN_SAVED', onSpanSaved);
    App.dispatcher.subscribe('SPAN_DELETED', onSpanDeleted);
    App.dispatcher.subscribe('SPAN_CHANGED', updateSpansAvailable);// SPAMMY
  };

  var onDateChanged = function(date) {
    spans = date.spans;
    updateSpansAvailable();
  };

  var onSpanSaved = function(data) {
    spans = data.record.spans;
    updateSpansAvailable();
  };

  var onSpanDeleted = function(data) {
    spans = data.record.spans;
    updateSpansAvailable();
  };

  var addAvailableTask = function() {
    taskList.addTask(this.innerText);
    updateSpansAvailable();
  };

  var updateSpansAvailable = function() {
    availableList.empty();

    if (spans === undefined)
      return;

    buildUnassignedTasks(spans).forEach(task => {
      const item = jQuery('<li></li>');
      item.append(task);
      item.click(addAvailableTask);
      availableList.append(item);
    });
  };

  var buildUnassignedTasks = function() {
    var allTasks = [];
    Object.entries(spans).forEach(span => {
      allTasks = [...allTasks, ...span[1].tasks];
    });

    const uniqueTasks = allTasks.filter((task, index) => {
      return allTasks.indexOf(task) === index;
{'fraction_non_alphanumeric': 0.14290563475899526, 'fraction_numerical': 0.0006788866259334691, 'mean_word_length': 3.4651515151515153, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '7656263', 'n_tokens_mistral': 942, 'n_tokens_neox': 924, 'n_words': 154}