<commit_before>/*
 * Script that generates a random question. Parameter should
 * be a list of integers that refer to indeces in the CSV file
 * over which the user would like to be tested.
 */
function QuestionGenerator(list) {

  // The array of questions
  var musicSnippets = makeMusicSnippets(list);

  function makeMusicSnippets(array) {
    var ms = [];
    for (var i = 0; i < array.length; i++) {
      console.log(data[list[i]][0] + " " + data[list[i]][1]);
      ms.push(new MusicSnippet(data[list[i]][2], data[list[i]][0],
        data[list[i]][1]));
    }
    return ms;
  }

  /*
   * Picks a random MusicSnippet from the array.
   */
  this.getNextQuestion = function() {
    return musicSnippets[Math.floor(Math.random() * musicSnippets.length)];
  }

  /*
   * Picks a random sonority from the user's list of selected
   * sonorities. When called, sets the answer for this question.
   * Also initializes type.
   */
  function selectRandomSonority(sonorities) {
    var i = Math.floor(Math.random() * sonorities.length);
    type = sonorities[i].type1;
    return sonorities[i].type2;
  }

}<commit_msg>removed an extraneous method from QuestionGenerator<commit_after>/*
 * Script that generates a random question. Parameter should
 * be a list of integers that refer to indeces in the CSV file
 * over which the user would like to be tested.
 */
function QuestionGenerator(list) {

  // The array of questions
  var musicSnippets = makeMusicSnippets(list);

  function makeMusicSnippets(array) {
    var ms = [];
    for (var i = 0; i < array.length; i++) {
      console.log(data[list[i]][0] + " " + data[list[i]][1]);
      ms.push(new MusicSnippet(data[list[i]][2], data[list[i]][0],
        data[list[i]][1]));
    }
    return ms;
  }

  /*
   * Picks a random MusicSnippet from the array.
   */
  this.getNextQuestion = function() {
    return musicSnippets[Math.floor(Math.random() * musicSnippets.length)];
  }
}
{'fraction_non_alphanumeric': 0.13254254770500257, 'fraction_numerical': 0.007220216606498195, 'mean_word_length': 3.311111111111111, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7459600', 'n_tokens_mistral': 648, 'n_tokens_neox': 618, 'n_words': 179}