<commit_before>'use strict';

// Sync all mail from all users to Cluestr.
// Note: only the last mail modified since last run will be uploaded.
module.exports = function(task, cluestrClient, cb) {
  console.log("UPPING", task.url);

  var mail = {
    identifier: task.url,
    actions: {
      show: task.url
    },
    metadatas: {
      from: task.from,
      to: task.to,
      subject: task.subject,
      labels: task.labels,
      text: task.text
    },
    datas: {
      html: task.html,
      id: task.id,
      threadid: task.threadid,
      uid: task.uid,
    },
    semantic_document_type: 'email',
    user_access: [cluestrClient.accessToken]
  };

  cluestrClient.sendDocument(mail, function(err, document) {
    if(err) {
      console.log(err);
    }
    cb(err, document);
  });
};<commit_msg>Removed semantic / binary document_type<commit_after>'use strict';

// Sync all mail from all users to Cluestr.
// Note: only the last mail modified since last run will be uploaded.
module.exports = function(task, cluestrClient, cb) {
  console.log("UPPING", task.url);

  var mail = {
    identifier: task.url,
    actions: {
      show: task.url
    },
    metadatas: {
      from: task.from,
      to: task.to,
      subject: task.subject,
      labels: task.labels,
      text: task.text
    },
    datas: {
      html: task.html,
      id: task.id,
      threadid: task.threadid,
      uid: task.uid,
    },
    document_type: 'email',
    user_access: [cluestrClient.accessToken]
  };

  cluestrClient.sendDocument(mail, function(err, document) {
    if(err) {
      console.log(err);
    }
    cb(err, document);
  });
};
{'fraction_non_alphanumeric': 0.13117754728492984, 'fraction_numerical': 0.0, 'mean_word_length': 2.4745762711864407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5611949', 'n_tokens_mistral': 562, 'n_tokens_neox': 550, 'n_words': 135}