<commit_before>#! /usr/bin/env node
var prompt = require('prompt');
var q = require('q');
var words = require('./services/wordservice');

var choices = [];
var answer = null;
var wordOptions = { length: 5, count: 5 };

words.get(wordOptions, function(words) {
  choices = words;
});



// var answer = 'awesome';
// var guesses = [];
// function promptForGuess(deferred) {
//   deferred = (deferred === undefined) ? q.defer() : deferred;
//
//   prompt.start();
//   prompt.get('guess', function(err, response) {
//     guesses.push(response.guess);
//     if(response.guess === answer) {
//       deferred.resolve();
//     }  else {
//       promptForGuess(deferred);
//     }
//   });
//
//   return deferred.promise;
// }
//
// promptForGuess().then(function() { console.log('Done!', guesses); });
<commit_msg>printing options and answer<commit_after>#! /usr/bin/env node
var prompt = require('prompt');
var q = require('q');
var words = require('./services/wordservice');

var choices = [];
var answer = null;
var wordOptions = { length: 5, count: 5 };

console.log('Let\'s play a game.');

words.get(wordOptions, function(words) {
  choices = words;
  secret = choices[Math.floor(Math.random() * choices.length)];

  console.log('These are the options: ');
  choices.forEach(function(w) {
    console.log(' -', w);
  });

  console.log('The secret answer is:', secret);
});



// var answer = 'awesome';
// var guesses = [];
// function promptForGuess(deferred) {
//   deferred = (deferred === undefined) ? q.defer() : deferred;
//
//   prompt.start();
//   prompt.get('guess', function(err, response) {
//     guesses.push(response.guess);
//     if(response.guess === answer) {
//       deferred.resolve();
//     }  else {
//       promptForGuess(deferred);
//     }
//   });
//
//   return deferred.promise;
// }
//
// promptForGuess().then(function() { console.log('Done!', guesses); });

{'fraction_non_alphanumeric': 0.2095839915745129, 'fraction_numerical': 0.00210637177461822, 'mean_word_length': 3.086021505376344, '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': '4449544', 'n_tokens_mistral': 639, 'n_tokens_neox': 625, 'n_words': 130}