<commit_before><commit_msg>added parseInput.js and my_modules folder<commit_after>var parse = function(voicerec) {
  var manualExpiration = false;


  voicerec.replace(/eighteen/,"18");
  voicerec.replace(/seventeen/,"17");
  voicerec.replace(/sixteen/,"16");
  voicerec.replace(/fifteen/,"15");
  voicerec.replace(/fourteen/,"14");
  voicerec.replace(/thirteen/,"13");
  voicerec.replace(/twelve|dozen/,"12");
  voicerec.replace(/eleven/,"11");
  voicerec.replace(/ten/,"10");
  voicerec.replace(/nine/,"9");
  voicerec.replace(/eight/,"8");
  voicerec.replace(/seven/,"7");
  voicerec.replace(/six|half a dozen/,"6");
  voicerec.replace(/five/,"5");
  voicerec.replace(/four/,"4");
  voicerec.replace(/three/,"3");
  voicerec.replace(/two|pair of/,"2");
  voicerec.replace(/an|one/,"1");

  var re = /(add|remove)\s(\d*)\s([a-zA-Z]{2,})/;

  var parseResult = voicerec.match(re); //array [0]= matched string, [1]= matched word 1, [n-1] = int index where it was found, [n] = input

  if (parseResult[4]=='expir'){
    manualExpiration = true;
  }

  return {quantity: parseInt(parseResult[2]), type:parseResult[3], manualExpiration:manualExpiration};
};

module.exports = parse;
{'fraction_non_alphanumeric': 0.21628498727735368, 'fraction_numerical': 0.029686174724342665, 'mean_word_length': 4.841584158415841, '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': '6925950', 'n_tokens_mistral': 479, 'n_tokens_neox': 418, 'n_words': 65}