<commit_before>var readline = require('readline');

function Cli(handler) {
  this.handler = handler;
}

Cli.prototype.run = function() {
  var self = this;
  var rli = readline.createInterface(process.stdin, process.stdout);
  rli.setPrompt('> ');

  rli.on('line', function(line) {
    var args = line.split(/\s+/), cmd = args.shift();

    if (self.handler[cmd]) {
      self.handler[cmd].call(rli, args, function(err, res) {
        console.log(res);
        rli.prompt();
      });
    } else if (cmd.length > 0) {
      console.log('cmd not found.');
      rli.prompt();
    } else {
      rli.prompt();
    }
    rli.prompt();
  }).on('close', function() {
    console.log('');
    process.stdin.destroy();
  });<commit_msg>不要な標準出力削除<commit_after>var readline = require('readline');

function Cli(handler) {
  this.handler = handler;
}

Cli.prototype.run = function() {
  var self = this;
  var rli = readline.createInterface(process.stdin, process.stdout);
  rli.setPrompt('> ');

  rli.on('line', function(line) {
    var args = line.split(/\s+/), cmd = args.shift();

    if (self.handler[cmd]) {
      self.handler[cmd].call(rli, args, function(err, res) {
        rli.prompt();
      });
    } else if (cmd.length > 0) {
      console.log('cmd not found.');
      rli.prompt();
    } else {
      rli.prompt();
    }
    rli.prompt();
  }).on('close', function() {
    console.log('');
    process.stdin.destroy();
  });
{'fraction_non_alphanumeric': 0.1941340782122905, 'fraction_numerical': 0.0013966480446927375, 'mean_word_length': 2.8010610079575597, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1909363', 'n_tokens_mistral': 523, 'n_tokens_neox': 507, 'n_words': 93}