spanish-quizzer

An app to quiz you on Spanish vocabulary and verb conjugations
git clone https://git.ashermorgan.net/spanish-quizzer/
Log | Files | Refs | README

commit 63c325bfb6b7e19c19492b2ecdfdda746a3e9285
parent f53680008a8bf6c68aeaf6d6345f8fc894c065ec
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date:   Wed, 11 Nov 2020 19:08:51 -0800

Merge pull request #24 from AsherMorgan/multiple-prompts

Implement multiplePrompts and multipleAnswers settings.
Diffstat:
Mjs/home.js | 2++
Mjs/quizzer.js | 28+++++++++++++++++++---------
Mjs/settings.js | 197++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
Mtests/test.app.js | 2++
Mtests/test.quizzer.js | 86+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
Mtests/test.settings.js | 890+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
Mvocab/Adjectives.csv | 3+--
Mvocab/Clothes.csv | 3+--
Mvocab/Health.csv | 21+++++++--------------
Mvocab/House.csv | 12++++--------
Mvocab/Nature.csv | 9+++------
Mvocab/Prepositions.csv | 25++++++++-----------------
Mvocab/Professions.csv | 4+---
Mvocab/Transitions.csv | 16+++++-----------
Mvocab/Vacation.csv | 6++----
Mvocab/Verbs.csv | 21+++++++--------------
16 files changed, 845 insertions(+), 480 deletions(-)

diff --git a/js/home.js b/js/home.js @@ -20,6 +20,8 @@ function loadVue() { inputType: "Text", onMissedPrompt: "Correct me", repeatPrompts: "Never", + multiplePrompts: "Show together", + multipleAnswers: "Require all", }, prompts: [], diff --git a/js/quizzer.js b/js/quizzer.js @@ -23,6 +23,7 @@ let quizzer = Vue.component("quizzer", { inputType: "Text", onMissedPrompt: "Correct me", repeatPrompts: "Never", + multipleAnswers: "Require all", } }, }, @@ -150,7 +151,7 @@ let quizzer = Vue.component("quizzer", { } // Parse responce - var responce = this.responce.toLowerCase(); // Make responce lowercase + let responce = this.responce.toLowerCase(); // Make responce lowercase responce = responce.replace(/a`/g, "á"); // Apply accented a shortcut responce = responce.replace(/e`/g, "é"); // Apply accented e shortcut responce = responce.replace(/i`/g, "í"); // Apply accented i shortcut @@ -159,25 +160,34 @@ let quizzer = Vue.component("quizzer", { responce = responce.replace(/o`/g, "ó"); // Apply accented o shortcut responce = responce.replace(/u`/g, "ú"); // Apply accented u shortcut responce = responce.replace(/u~/g, "ü"); // Apply u with diaeresis shortcut - var responces = responce.split(","); // Split string by commas - for (var i = 0; i < responces.length; i++) { + let responces = responce.split(","); // Split string by commas + for (let i = 0; i < responces.length; i++) { responces[i] = responces[i].split(" ").filter(function(x){return x !== "";}).join(" "); // Trim whitespace } // Parse answer let answers = this.prompt[3].toLowerCase().split(","); // Split string by commas - for (var i = 0; i < answers.length; i++) { + for (let i = 0; i < answers.length; i++) { answers[i] = answers[i].trim(); // Trim whitespace } - // Check responce - var correct = true; - for (var answer of answers) { - if (!responces.includes(answer)) { - correct = false; + // Count correct responces + let correctResponces = 0; + for (let answer of answers) { + if (responces.includes(answer)) { + correctResponces++; } } + // Determine if responce is correct (and enforce multipleAnswers setting) + let correct; + if (this.settings.multipleAnswers === "Require all") { + correct = correctResponces === answers.length; + } + else { + correct = correctResponces > 0; + } + // Give user feedback if (!correct && (this.settings.onMissedPrompt === "Correct me" || this.settings.onMissedPrompt === "Tell me")) { // Show and hide elements diff --git a/js/settings.js b/js/settings.js @@ -16,6 +16,8 @@ let settings = Vue.component("settings", { inputType: "Text", onMissedPrompt: "Correct me", repeatPrompts: "Never", + multiplePrompts: "Show together", + multipleAnswers: "Require all", }, }; }, @@ -191,20 +193,11 @@ let settings = Vue.component("settings", { // Get prompts let prompts; if (this.category === "vocab") { - // Filter and load Sets into prompts - prompts = []; - for (let filter of this.vocabFilters) - { - // Add filtered set - prompts.push(...ApplyVocabFilter(Sets[filter.set], filter.type, filter.direction)); - } - - // Shuffle prompts - prompts = Shuffle(prompts); + prompts = Shuffle(ApplyFilters(Sets, GetVocabFilters(this.vocabFilters), this.settings.multiplePrompts)); } else if (this.category === "verbs") { // Get prompts - prompts = Shuffle(ApplyVerbFilter(Sets["Verbs"], this.verbFilters)); + prompts = Shuffle(ApplyFilters(Sets, GetVerbFilters(this.verbFilters), this.settings.multiplePrompts)); } // Set progress @@ -323,6 +316,12 @@ let settings = Vue.component("settings", { if (parsedSettings.repeatPrompts && ["Never", "Immediately", "5 prompts later", "At the end"].includes(parsedSettings.repeatPrompts)) { this.settings.repeatPrompts = parsedSettings.repeatPrompts; } + if (parsedSettings.multiplePrompts && ["Show together", "Show separately", "Show one"].includes(parsedSettings.multiplePrompts)) { + this.settings.multiplePrompts = parsedSettings.multiplePrompts; + } + if (parsedSettings.multipleAnswers && ["Require one", "Require any"].includes(parsedSettings.multipleAnswers)) { + this.settings.multipleAnswers = parsedSettings.multipleAnswers; + } }, destroyed: function() { @@ -438,8 +437,8 @@ let settings = Vue.component("settings", { </select> </div> <div> - <label for="settingsRepeatPrompts">When I miss a prompt</label> - <select id="settingsRepeatPrompts" v-model="settings.onMissedPrompt"> + <label for="settingsOnMissedPrompt">When I miss a prompt</label> + <select id="settingsOnMissedPrompt" v-model="settings.onMissedPrompt"> <option>Correct me</option> <option>Tell me</option> <option>Ignore it</option> @@ -454,6 +453,21 @@ let settings = Vue.component("settings", { <option>At the end</option> </select> </div> + <div> + <label for="settingsMultiplePrompts">Multiple prompts</label> + <select id="settingsMultiplePrompts" v-model="settings.multiplePrompts"> + <option>Show together</option> + <option>Show separately</option> + <option>Show one</option> + </select> + </div> + <div> + <label for="settingsMultipleAnswers">Multiple answers</label> + <select id="settingsMultipleAnswers" v-model="settings.multipleAnswers"> + <option>Require all</option> + <option>Require any</option> + </select> + </div> </div> <div class="settingButtons"> @@ -467,67 +481,70 @@ let settings = Vue.component("settings", { /** - * Filter a vocab set. - * @param {Array} vocabSet - The vocab set to filter. - * @param {String} type - The word type filter. - * @param {String} direction - The direction filter. - * @returns {Array} - A list of prompts. + * Create io-filters from an array of vocab filters. + * @param {Array} rawFilters The array of filters. + * @returns {Array} The io-filters. */ -function ApplyVocabFilter(terms, type, direction) { +function GetVocabFilters(rawFilters) { + // Expand "All directions" filters + let filters = []; // Format: [{set:"vocab set name", tense:"specific tense", subject:"specific subject", type:"regex"}] + for (let filter of rawFilters) { + if (filter.direction === "Eng. ↔ Esp.") { + filters.push({set:filter.set, type: filter.type, direction:"Eng. → Esp."}); + filters.push({set:filter.set, type: filter.type, direction:"Esp. → Eng."}); + } + else { + filters.push({set:filter.set, type: filter.type, direction:filter.direction}); + } + } + // Get type regex filter - let regularity; - switch (type.toLowerCase()) { - case "adjectives": - regularity = "Adjective"; - break; - case "nouns": - regularity = "Noun"; - break; - case "verbs": - regularity = "Verb"; - break; - case "all types": - regularity = ".*"; - break; - default: - throw `Unrecognized filter: ${type}.`; + for (let filter of filters) { + switch (filter.type.toLowerCase()) { + case "adjectives": + filter.type = "Adjective"; + break; + case "nouns": + filter.type = "Noun"; + break; + case "verbs": + filter.type = "Verb"; + break; + case "all types": + filter.type = ".*"; + break; + default: + throw `Unrecognized filter: ${type}.`; + } } - // Filter terms - let results = []; // Format: [[<output label>, <output>, <input label>, <input>]] - for (let term of terms.slice(1)) { - // Check against filters - if (term[2].match(regularity)) { - if (direction === "Eng. ↔ Esp.") { - results.push([terms[0][0], term[0], terms[0][1], term[1]]); - results.push([terms[0][1], term[1], terms[0][0], term[0]]); - } - else if (direction === "Eng. → Esp.") { - results.push([terms[0][0], term[0], terms[0][1], term[1]]); - } - else if (direction === "Esp. → Eng.") { - results.push([terms[0][1], term[1], terms[0][0], term[0]]); - } - else { - throw `Unrecognized direction: ${direction}.`; - } + // Create io-filters + let ioFilters = []; // Format: [{set:"vocab set name", outputIndex:0, inputIndex:0, filterIndex:0, filterValue:"regex"}] + for (let filter of filters) { + // Create filter + if (filter.direction.toLowerCase().startsWith("eng")) { + ioFilters.push({set:filter.set, outputIndex:0, inputIndex:1, filterIndex:2, filterValue:filter.type}); + } + else { + ioFilters.push({set:filter.set, outputIndex:1, inputIndex:0, filterIndex:2, filterValue:filter.type}); } } - return results; + + // Return io-filters + return ioFilters; } /** - * Filter verb conjugations. - * @param {Array} terms - The list of verb conjugations to filter. - * @param {Array} filterInfo - A list of filters. - * @returns {Array} - A list of prompts. + * Create io-filters from an array of verb filters. + * @param {Array} rawFilters The array of filters. + * @returns {Array} The io-filters. */ -function ApplyVerbFilter(terms, filterInfo) { +function GetVerbFilters(rawFilters) { // Expand "All Tenses" filters - let filters = []; // Format: [{tense:"specific tense", subject:"specific subject", type:"regex"}] - for (let filter of filterInfo) { + let filters = []; // Format: [{set:"Verbs", tense:"specific tense", subject:"specific subject", type:"regex"}] + for (let filter of rawFilters) { if (filter.tense.toLowerCase() === "all tenses") { filters.push({ tense: "present participles", type: filter.type, subject: filter.subject, direction: filter.direction }); filters.push({ tense: "present tense", type: filter.type, subject: filter.subject, direction: filter.direction }); @@ -583,8 +600,8 @@ function ApplyVerbFilter(terms, filterInfo) { } } - // Create io filters - let ioFilters = []; // Format: [{outputIndex:0, inputIndex:0, filterIndex:0, filterValue:"regex"}] + // Create io-filters + let ioFilters = []; // Format: [{set:"Verbs", outputIndex:0, inputIndex:0, filterIndex:0, filterValue:"regex"}] for (let filter of filters) { // Get output index let outputIndex; @@ -699,24 +716,68 @@ function ApplyVerbFilter(terms, filterInfo) { // Create filter if (filter.direction.toLowerCase().startsWith("conj")) { // Swap input and output - ioFilters.push({outputIndex:inputIndex, inputIndex:outputIndex, filterIndex:filterIndex, filterValue:filter.type}) + ioFilters.push({set:"Verbs", outputIndex:inputIndex, inputIndex:outputIndex, filterIndex:filterIndex, filterValue:filter.type}) } else { - ioFilters.push({outputIndex:outputIndex, inputIndex:inputIndex, filterIndex:filterIndex, filterValue:filter.type}) + ioFilters.push({set:"Verbs", outputIndex:outputIndex, inputIndex:inputIndex, filterIndex:filterIndex, filterValue:filter.type}) } } + // Return io-filters + return ioFilters; +} + + + +/** + * Creates an array of prompts from an array of io-filters. + * @param {Object} terms The terms to filter. + * @param {Array} filters The io-filters. + * @returns {Array} The prompts. + */ +function ApplyFilters(terms, filters, multiplePrompts="Show together") { // Filter terms let results = []; // Format: [[<output label>, <output>, <input label>, <input>]] - for (let filter of ioFilters) { + for (let filter of filters) { // Iterate over terms (minus headers) - for (let term of terms.slice(1)) { + for (let term of terms[filter.set].slice(1)) { // Check against filters if (term[filter.filterIndex].match(filter.filterValue)) { - results.push([terms[0][filter.outputIndex], term[filter.outputIndex], terms[0][filter.inputIndex], term[filter.inputIndex]]); + results.push([terms[filter.set][0][filter.outputIndex], term[filter.outputIndex], terms[filter.set][0][filter.inputIndex], term[filter.inputIndex]]); } } } + + // Iterate over prompts to enforce multiplePrompts setting + for (let result of results) { + // Get array of prompt outputs + let prompts = result[1].split(/\s*,\s*/); + + // Check if multiple outputs exist + if (prompts.length > 1) { + switch (multiplePrompts) { + case "Show one": + // Set current prompt's output to a random prompt + result[1] = prompts[Math.floor(Math.random() * (prompts.length - 1))] + break; + + case "Show separately": + result[1] = prompts[0]; // Set current prompt's output to 1st prompt + for (let prompt of prompts.splice(1)) { + // Add seperate prompts for extra outputs + results.push([result[0], prompt, result[2], result[3]]) + } + break; + + case "Show together": + default: + // Do nothing + break; + } + } + } + + // Return prompts return results; } diff --git a/tests/test.app.js b/tests/test.app.js @@ -18,6 +18,8 @@ describe("App", function() { expect(app.settings.inputType).to.equal("Text"); expect(app.settings.onMissedPrompt).to.equal("Correct me"); expect(app.settings.repeatPrompts).to.equal("Never"); + expect(app.settings.multiplePrompts).to.equal("Show together"); + expect(app.settings.multipleAnswers).to.equal("Require all"); }); it("Prompts should be empty", function() { diff --git a/tests/test.quizzer.js b/tests/test.quizzer.js @@ -23,6 +23,7 @@ describe("Quizzer", function() { expect(Quizzer.settings.inputType).to.equal("Text"); expect(Quizzer.settings.onMissedPrompt).to.equal("Correct me"); expect(Quizzer.settings.repeatPrompts).to.equal("Never"); + expect(Quizzer.settings.multipleAnswers).to.equal("Require all"); }); it("Prompts should be empty", function() { @@ -32,22 +33,22 @@ describe("Quizzer", function() { it("Index should be 0", function() { expect(Quizzer.index).to.equal(0); }); - + it("Responce should be empty", function() { expect(Quizzer.responce).to.equal(""); }); - + it("ResponceActive should be true", function() { expect(Quizzer.responceActive).to.equal(true); }); }); - + describe("Reset method", function() { it("Shouldn't do anything if active is false", function() { // Initialize quizzer Quizzer.prompts = [0, 1]; Quizzer.index = 0; - + // Run Reset Quizzer.Reset(); @@ -57,7 +58,7 @@ describe("Quizzer", function() { expect(Quizzer.responce).to.equal(""); expect(Quizzer.responceActive).to.equal(true); }); - + it("Should reset responce", function() { // Initialize variables Quizzer.active = true; @@ -70,7 +71,7 @@ describe("Quizzer", function() { // Assert reset called expect(Quizzer.responce).to.equal(""); }); - + it("Should set responceActive to true", function() { // Initialize variables Quizzer.active = true; @@ -82,7 +83,7 @@ describe("Quizzer", function() { // Assert responceActive is true expect(Quizzer.responceActive).to.equal(true); }); - + it("Should focus input", function() { // Initialize variables Quizzer.active = true; @@ -93,7 +94,7 @@ describe("Quizzer", function() { input: { focus: function() { focusCalled = true; - } + } } }; @@ -103,7 +104,7 @@ describe("Quizzer", function() { // Assert focus called expect(focusCalled).to.equal(true); }); - + it("Should emit 'new-prompts' event", function() { // Initialize variables Quizzer.active = true; @@ -147,14 +148,14 @@ describe("Quizzer", function() { it("Shouldn't do anything if active is false", function() { // Initialize variables Quizzer.responceActive = "test"; // Will be changed whether or not resopnce is correct - + // Run Submit Quizzer.Submit(); // Assert nothing changed expect(Quizzer.responceActive).to.equal("test"); }); - + it("Should call Reset if responce is correct", function() { // Initialize variables Quizzer.active = true; @@ -173,7 +174,7 @@ describe("Quizzer", function() { // Assert Reset called expect(resetCalled).to.equal(true); }); - + it("Should call Continue if onMissedPrompt is set to 'Ignore it'", function() { // Initialize variables Quizzer.active = true; @@ -193,7 +194,7 @@ describe("Quizzer", function() { // Assert Continue called expect(continueCalled).to.equal(true); }); - + it("Should not call Reset if onMissedPrompt is set to 'Tell me'", function() { // Initialize variables Quizzer.active = true; @@ -226,7 +227,7 @@ describe("Quizzer", function() { // Assert responceActive set to false expect(Quizzer.responceActive).to.equal(false); }); - + it("Should focus input if responce is incorrect", function() { // Initialize variables Quizzer.active = true; @@ -239,7 +240,7 @@ describe("Quizzer", function() { input: { focus: function() { focusCalled = true; - } + } } }; @@ -287,20 +288,35 @@ describe("Quizzer", function() { // Assert responce accepted expect(resetCalled).to.equal(true); }); - - it("Should require all answers", function() { + + it("Should require all answers if multipleAnswers is set to 'Require all'", function() { // Initialize variables Quizzer.active = true; + Quizzer.settings.multipleAnswers = "Require all"; Quizzer.prompts = [["A1", "A2", "A3", "A1, A2, A3, A4"]] Quizzer.responce = "A1, A2, A3"; // Call Submit Quizzer.Submit(); - // Assert answer no accepted + // Assert answer not accepted expect(Quizzer.responceActive).to.equal(false); }); - + + it("Shouldn't require all answers if multipleAnswers is set to 'Require any'", function() { + // Initialize variables + Quizzer.active = true; + Quizzer.settings.multipleAnswers = "Require any"; + Quizzer.prompts = [["A1", "A2", "A3", "A1, A2, A3, A4"]] + Quizzer.responce = "A1, A2, A3"; + + // Call Submit + Quizzer.Submit(); + + // Assert answer accepted + expect(Quizzer.responceActive).to.equal(true); + }); + it("Should accept mixed-case responces", function() { // Initialize variables Quizzer.active = true; @@ -338,7 +354,7 @@ describe("Quizzer", function() { // Assert responce accepted expect(resetCalled).to.equal(true); }); - + it("Should convert accented characters", function() { // Initialize variables Quizzer.active = true; @@ -370,7 +386,7 @@ describe("Quizzer", function() { Quizzer.Reset = function() { resetCalled = true; }; - + // Run Continue Quizzer.Continue(); @@ -392,7 +408,7 @@ describe("Quizzer", function() { // Run Continue Quizzer.Continue(); - + // Assert prompts not changed expect(Quizzer.prompts[0]).to.have.members(["A1", "A2", "A3", "A4"]); expect(Quizzer.prompts[1]).to.have.members(["B1", "B2", "B3", "B4"]); @@ -408,7 +424,7 @@ describe("Quizzer", function() { // Run Continue Quizzer.Continue(); - + // Assert prompts not changed expect(Quizzer.prompts[0]).to.have.members(["A1", "A2", "A3", "A4"]); expect(Quizzer.prompts[1]).to.have.members(["B1", "B2", "B3", "B4"]); @@ -424,7 +440,7 @@ describe("Quizzer", function() { // Run Continue Quizzer.Continue(); - + // Assert prompts not changed expect(Quizzer.prompts[0]).to.have.members(["A1", "A2", "A3", "A4"]); expect(Quizzer.prompts[1]).to.have.members(["B1", "B2", "B3", "B4"]); @@ -448,7 +464,7 @@ describe("Quizzer", function() { // Run Continue Quizzer.Continue(); - + // Assert prompts not changed expect(Quizzer.prompts[0]).to.have.members(["B1", "B2", "B3", "B4"]); expect(Quizzer.prompts[1]).to.have.members(["C1", "C2", "C3", "C4"]); @@ -477,7 +493,7 @@ describe("Quizzer", function() { // Run Continue Quizzer.Continue(); - + // Assert prompts not changed expect(Quizzer.prompts[0]).to.have.members(["B1", "B2", "B3", "B4"]); expect(Quizzer.prompts[1]).to.have.members(["C1", "C2", "C3", "C4"]); @@ -496,7 +512,7 @@ describe("Quizzer", function() { Quizzer.prompts = [["A1", "A2", "A3", "A4"], ["B1", "B2", "B3", "B4"]]; // Will change if Continue is called Quizzer.index = 0; // Will be changed if Reset is called Quizzer.settings.repeatPrompts = "At the end"; - + // Run Enter Quizzer.Enter(); @@ -510,7 +526,7 @@ describe("Quizzer", function() { // Initialize variables Quizzer.active = true; Quizzer.responceActive = true; - + // Override Submit and Continue methods let submitCalled = false; Quizzer.Submit = function() { @@ -533,7 +549,7 @@ describe("Quizzer", function() { // Initialize variables Quizzer.active = true; Quizzer.responceActive = false; - + // Override Submit and Continue methods let submitCalled = false; Quizzer.Submit = function() { @@ -593,7 +609,7 @@ describe("Quizzer", function() { // Assert prompts and index are correct expect(Quizzer.index).to.equal(0); expect(Quizzer.prompts.length).to.equal(0); - + // Assert prompt is empty expect(Quizzer.prompt.length).to.equal(4); expect(Quizzer.prompt[0]).to.equal(""); @@ -601,14 +617,14 @@ describe("Quizzer", function() { expect(Quizzer.prompt[2]).to.equal(""); expect(Quizzer.prompt[3]).to.equal(""); }); - + it("Should be empty if index is invalid", function() { // Initialize index Quizzer.index = 2; - + // Assert prompts is correct expect(Quizzer.prompts.length).to.equal(0); - + // Assert prompt is empty expect(Quizzer.prompt.length).to.equal(4); expect(Quizzer.prompt[0]).to.equal(""); @@ -616,7 +632,7 @@ describe("Quizzer", function() { expect(Quizzer.prompt[2]).to.equal(""); expect(Quizzer.prompt[3]).to.equal(""); }); - + it("Should be the current prompt if index is valid", function() { // Initialize prompts and index Quizzer.index = 1; @@ -625,7 +641,7 @@ describe("Quizzer", function() { ["a2", "b2", "c2", "d2"], ["a3", "b3", "c3", "d3"], ]; - + // Assert prompt is correct expect(Quizzer.prompt.length).to.equal(4); expect(Quizzer.prompt[0]).to.equal("a2"); diff --git a/tests/test.settings.js b/tests/test.settings.js @@ -9,7 +9,7 @@ describe("Settings", function() { it("Category should be 'verbs'", function() { expect(Settings.category).to.equal("verbs"); }); - + it("VerFilters should be empty", function() { expect(Settings.verbFilters.length).to.equal(0); }); @@ -17,14 +17,14 @@ describe("Settings", function() { it("VocabFilters should be empty", function() { expect(Settings.vocabFilters.length).to.equal(0); }); - + it("Settings should be loaded", async function() { // Save original setting from localStorage let originalValue = localStorage.getItem("settings"); // Set localStorage settings localStorage.setItem("settings", "{\"promptType\":\"Audio\",\"inputType\":\"Voice\",\"onMissedPrompt\":\"Tell me\",\"repeatPrompts\":\"5 prompts later\"}") - + // (re)Create settings component Settings = new settings(); await Settings.$nextTick(); // Allow Settings to update localStorage (so we can override it later) @@ -34,6 +34,8 @@ describe("Settings", function() { expect(Settings.settings.inputType).to.equal("Voice"); expect(Settings.settings.onMissedPrompt).to.equal("Tell me"); expect(Settings.settings.repeatPrompts).to.equal("5 prompts later"); + expect(Settings.settings.multiplePrompts).to.equal("Show together"); + expect(Settings.settings.multipleAnswers).to.equal("Require all"); // Restore original setting to localStorage localStorage.setItem("settings", originalValue); @@ -45,7 +47,7 @@ describe("Settings", function() { // Set localStorage settings localStorage.setItem("settings", "{\"promptType\":\"Audio\",\"inputType\":\"test\",\"onMissedPrompt\":null}") - + // (re)Create settings component Settings = new settings(); await Settings.$nextTick(); // Allow Settings to update localStorage (so we can override it later) @@ -63,20 +65,20 @@ describe("Settings", function() { it("Invalid JSON settings should not be loaded", async function() { // Save original setting from localStorage let originalValue = localStorage.getItem("settings"); - + // Set localStorage settings localStorage.setItem("settings", "asdf") - + // (re)Create settings component Settings = new settings(); await Settings.$nextTick(); // Allow Settings to update localStorage (so we can override it later) - + // Assert default settings loaded expect(Settings.settings.promptType).to.equal("Text"); expect(Settings.settings.inputType).to.equal("Text"); expect(Settings.settings.onMissedPrompt).to.equal("Correct me"); expect(Settings.settings.repeatPrompts).to.equal("Never"); - + // Restore original setting to localStorage localStorage.setItem("settings", originalValue); }); @@ -349,7 +351,7 @@ describe("Settings", function() { expect(filters["Nouns"]).to.equal(false); expect(filters["Verbs"]).to.equal(false); }); - + it("Should be correct for sets with 1 type", function() { // Initialize filters Settings.vocabFilters = [ @@ -411,217 +413,208 @@ describe("Settings", function() { Settings.settings.inputType = "B"; Settings.settings.onMissedPrompt = "C"; Settings.settings.repeatPrompts = "D"; + Settings.settings.multiplePrompts = "E"; + Settings.settings.multipleAnswers = "F"; await Settings.$nextTick(); // Assert localStorage setting updated - expect(localStorage.getItem("settings")).to.equal("{\"promptType\":\"A\",\"inputType\":\"B\",\"onMissedPrompt\":\"C\",\"repeatPrompts\":\"D\"}"); + expect(localStorage.getItem("settings")).to.equal(`{"promptType":"A","inputType":"B","onMissedPrompt":"C","repeatPrompts":"D","multiplePrompts":"E","multipleAnswers":"F"}`); // Restore original setting to localStorage localStorage.setItem("settings", originalValue); }); }); - describe("ApplyVocabFilter method", function() { - // Initialize vocab - let vocab = [ - ["Upper", "Lower", "Type"], - ["A", "a", "Noun"], - ["B", "b", "Adjective"], - ["C", "c", "Verb"] - ]; - + describe("GetVocabFilters method", function() { it("Should correctly filter vocab for All Definitions", function() { // Initialize expected let expected = [ - ["Upper", "A", "Lower", "a"], - ["Upper", "B", "Lower", "b"], - ["Upper", "C", "Lower", "c"], - ["Lower", "a", "Upper", "A"], - ["Lower", "b", "Upper", "B"], - ["Lower", "c", "Upper", "C"], + {set:"Colors", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + {set:"Colors", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:".*"}, ]; // Filter vocab - let actual = ApplyVocabFilter(vocab, "All Types", "Eng. ↔ Esp."); + let actual = GetVocabFilters([{set:"Colors", type:"All Types", direction:"Eng. ↔ Esp."}]); // Assert filtered vocab is correct expect(actual).to.have.deep.members(expected); }); - it("Should correctly filter vocab for English to Spanish", function() { + it("Should correctly filter vocab for multiple filters", function() { // Initialize expected let expected = [ - ["Upper", "A", "Lower", "a"], - ["Upper", "B", "Lower", "b"], - ["Upper", "C", "Lower", "c"], + {set:"Colors", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + {set:"Colors", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:".*"}, + {set:"Months", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:"Verb"}, ]; // Filter vocab - let actual = ApplyVocabFilter(vocab, "All Types", "Eng. → Esp."); + let actual = GetVocabFilters([ + {set:"Colors", type:"All Types", direction:"Eng. ↔ Esp."}, + {set:"Months", type:"Verbs", direction:"Esp. → Eng."}, + ]); // Assert filtered vocab is correct expect(actual).to.have.deep.members(expected); }); - it("Should correctly filter vocab for Spanish to English", function() { - // Initialize expected - let expected = [ - ["Lower", "a", "Upper", "A"], - ["Lower", "b", "Upper", "B"], - ["Lower", "c", "Upper", "C"], - ]; + describe("Direction filters", function() { + it("Should correctly filter vocab for English to Spanish", function() { + // Initialize expected + let expected = [ + {set:"Colors", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + ]; - // Filter vocab - let actual = ApplyVocabFilter(vocab, "All Types", "Esp. → Eng."); + // Filter vocab + let actual = GetVocabFilters([{set:"Colors", type:"All Types", direction:"Eng. → Esp."}]); - // Assert filtered vocab is correct - expect(actual).to.have.deep.members(expected); - }); - - it("Should correctly filter vocab for Nouns", function() { - // Initialize expected - let expected = [ - ["Upper", "A", "Lower", "a"], - ["Lower", "a", "Upper", "A"], - ]; + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); - // Filter vocab - let actual = ApplyVocabFilter(vocab, "Nouns", "Eng. ↔ Esp."); + it("Should correctly filter vocab for Spanish to English", function() { + // Initialize expected + let expected = [ + {set:"Colors", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:".*"}, + ]; - // Assert filtered vocab is correct - expect(actual).to.have.deep.members(expected); + // Filter vocab + let actual = GetVocabFilters([{set:"Colors", type:"All Types", direction:"Esp. → Eng."}]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); }); - - it("Should correctly filter vocab for Adjectives", function() { - // Initialize expected - let expected = [ - ["Upper", "B", "Lower", "b"], - ["Lower", "b", "Upper", "B"], - ]; - // Filter vocab - let actual = ApplyVocabFilter(vocab, "Adjectives", "Eng. ↔ Esp."); + describe("Word Type filters", function() { + it("Should correctly filter vocab for Nouns", function() { + // Initialize expected + let expected = [ + {set:"Colors", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Noun"}, + {set:"Colors", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:"Noun"}, + ]; - // Assert filtered vocab is correct - expect(actual).to.have.deep.members(expected); - }); - - it("Should correctly filter vocab for Verbs", function() { - // Initialize expected - let expected = [ - ["Upper", "C", "Lower", "c"], - ["Lower", "c", "Upper", "C"], - ]; + // Filter vocab + let actual = GetVocabFilters([{set:"Colors", type:"Nouns", direction:"Eng. ↔ Esp."}]); - // Filter vocab - let actual = ApplyVocabFilter(vocab, "Verbs", "Eng. ↔ Esp."); + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); - // Assert filtered vocab is correct - expect(actual).to.have.deep.members(expected); - }); - - it("Should throw error by default", function() { - // Assert throws error by default - expect(() => ApplyVocabFilter(vocab, "test", "Eng. ↔ Esp.")).to.throw() - expect(() => ApplyVocabFilter(vocab, "", "Eng. ↔ Esp.")).to.throw() - expect(() => ApplyVocabFilter(vocab, 1, "Eng. ↔ Esp.")).to.throw() - expect(() => ApplyVocabFilter(vocab, null, "Eng. ↔ Esp.")).to.throw() - - expect(() => ApplyVocabFilter(vocab, "Verbs", "test")).to.throw() - expect(() => ApplyVocabFilter(vocab, "Verbs", "")).to.throw() - expect(() => ApplyVocabFilter(vocab, "Verbs", "1")).to.throw() - expect(() => ApplyVocabFilter(vocab, "Verbs", null)).to.throw() + it("Should correctly filter vocab for Adjectives", function() { + // Initialize expected + let expected = [ + {set:"Colors", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Adjective"}, + {set:"Colors", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:"Adjective"}, + ]; + + // Filter vocab + let actual = GetVocabFilters([{set:"Colors", type:"Adjectives", direction:"Eng. ↔ Esp."}]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should correctly filter vocab for Verbs", function() { + // Initialize expected + let expected = [ + {set:"Colors", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Verb"}, + {set:"Colors", outputIndex:1, inputIndex:0, filterIndex:2, filterValue:"Verb"}, + ]; + + // Filter vocab + let actual = GetVocabFilters([{set:"Colors", type:"Verbs", direction:"Eng. ↔ Esp."}]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should throw error for unknown word type", function() { + expect(() => GetVocabFilters([{set:"Colors", type:"test", direction:"Eng. ↔ Esp."}])).to.throw() + expect(() => GetVocabFilters([{set:"Colors", type:"", direction:"Eng. ↔ Esp."}])).to.throw() + expect(() => GetVocabFilters([{set:"Colors", type:1, direction:"Eng. ↔ Esp."}])).to.throw() + expect(() => GetVocabFilters([{set:"Colors", type:null, direction:"Eng. ↔ Esp."}])).to.throw() + }); }); }); - describe("ApplyVerbFilter method", function() { - // Initialize verbs - // Headers are capitalized to tell them apart from the other rows - let verbs = [ - [ - "KEY", "SPANISH INF", - "TYPE", "1A", - "TYPE", "2A", "2B", "2C", "2D", "2E", - "TYPE", "3A", "3B", "3C", "3D", "3E", - "TYPE", "4A", "4B", "4C", "4D", "4E", - "TYPE", "5A", "5B", "5C", "5D", "5E", - ], - [ - "key", "spanish inf", - "Regular", "1a", - "Irregular", "2a", "2b", "2c", "2d", "2e", - "Orthographic", "3a", "3b", "3c", "3d", "3e", - "Reflexive,Stem Changing", "4a", "4b", "4c", "4d", "4e", - "Regular", "5a", "5b", "5c", "5d", "5e", - ], - ]; - - it("Should correctly filter verbs for All Conjugatinos", function() { - // Initialize expected + describe("GetVerbFilters method", function() { + it("Should correctly filter verbs for All Conjugations", function() { + // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "2E", "2e"], - ["KEY", "key", "3A", "3a"], - ["KEY", "key", "3B", "3b"], - ["KEY", "key", "3C", "3c"], - ["KEY", "key", "3D", "3d"], - ["KEY", "key", "3E", "3e"], - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "4E", "4e"], - ["KEY", "key", "5A", "5a"], - ["KEY", "key", "5B", "5b"], - ["KEY", "key", "5C", "5c"], - ["KEY", "key", "5D", "5d"], - ["KEY", "key", "5E", "5e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter verbs for multiple filters", function() { // Initialize expected let expected = [ - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "2E", "2e"], - ["KEY", "key", "3A", "3a"], - ["KEY", "key", "3B", "3b"], - ["KEY", "key", "3C", "3c"], - ["KEY", "key", "3D", "3d"], - ["KEY", "key", "3E", "3e"], - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "4E", "4e"], - - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "2E", "2e"], - - ["4D", "4d", "SPANISH INF", "spanish inf"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:".*"}, + + {set:"Verbs", outputIndex:03, inputIndex:1, filterIndex:02, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:08, inputIndex:1, filterIndex:04, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:14, inputIndex:1, filterIndex:10, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:20, inputIndex:1, filterIndex:16, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:26, inputIndex:1, filterIndex:22, filterValue:"Stem.?Changing"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [ - { tense:"all tenses", subject:"all subjects", type:"Nonregular", direction:"Eng. => Conj." }, - { tense:"present tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj." }, - { "tense":"all tenses", subject:"nosotros", type:"stem changing", direction:"Conj. => Esp." } + let actual = GetVerbFilters([ + { tense:"all tenses", subject:"all subjects", type:"Nonregular", direction:"Eng. => Conj." }, + { tense:"present tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj." }, + { tense:"all tenses", subject:"nosotros", type:"stem changing", direction:"Conj. => Esp." } ]); // Assert filtered verbs are correct @@ -632,79 +625,79 @@ describe("Settings", function() { it("Should correctly filter verbs for Present Participles", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], + {set:"Verbs", outputIndex:0, inputIndex:3, filterIndex:2, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"Present Participles", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"Present Participles", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter verbs for Present Tense", function() { // Initialize expected let expected = [ - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "2E", "2e"], + {set:"Verbs", outputIndex:0, inputIndex:5, filterIndex:4, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:6, filterIndex:4, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:7, filterIndex:4, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:8, filterIndex:4, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:9, filterIndex:4, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"Present Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"Present Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter verbs for Preterite Tense", function() { // Initialize expected let expected = [ - ["KEY", "key", "3A", "3a"], - ["KEY", "key", "3B", "3b"], - ["KEY", "key", "3C", "3c"], - ["KEY", "key", "3D", "3d"], - ["KEY", "key", "3E", "3e"], + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"Preterite Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"Preterite Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter verbs for Imperfect Tense", function() { // Initialize expected let expected = [ - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "4E", "4e"], + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"Imperfect Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"Imperfect Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter verbs for Simple Future Tense", function() { // Initialize expected let expected = [ - ["KEY", "key", "5A", "5a"], - ["KEY", "key", "5B", "5b"], - ["KEY", "key", "5C", "5c"], - ["KEY", "key", "5D", "5d"], - ["KEY", "key", "5E", "5e"], + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"Simple Future Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"Simple Future Tense", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -715,130 +708,215 @@ describe("Settings", function() { it("Should correctly filter regular verbs", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "5A", "5a"], - ["KEY", "key", "5B", "5b"], - ["KEY", "key", "5C", "5c"], - ["KEY", "key", "5D", "5d"], - ["KEY", "key", "5E", "5e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Regular"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Regular"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"Regular", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"Regular", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter reflexive verbs", function() { // Initialize expected let expected = [ - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "4E", "4e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Reflexive"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Reflexive"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"Reflexive", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"Reflexive", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter stem changing verbs", function() { // Initialize expected let expected = [ - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "4E", "4e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Stem.?Changing"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Stem.?Changing"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"Stem Changing", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"Stem Changing", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter orthographic verbs", function() { // Initialize expected let expected = [ - ["KEY", "key", "3A", "3a"], - ["KEY", "key", "3B", "3b"], - ["KEY", "key", "3C", "3c"], - ["KEY", "key", "3D", "3d"], - ["KEY", "key", "3E", "3e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Orthographic"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"Orthographic", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"Orthographic", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter irregular verbs", function() { // Initialize expected let expected = [ - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "2E", "2e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Irregular"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Irregular"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"irregular", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"irregular", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); - + it("Should correctly filter nonregular verbs", function() { // Initialize expected let expected = [ - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "2E", "2e"], - ["KEY", "key", "3A", "3a"], - ["KEY", "key", "3B", "3b"], - ["KEY", "key", "3C", "3c"], - ["KEY", "key", "3D", "3d"], - ["KEY", "key", "3E", "3e"], - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "4E", "4e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:"Irregular|Stem.?Changing|Orthographic"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"all subjects", type:"Nonregular", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"all subjects", type:"Nonregular", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); }); - + describe("Subject filters", function() { it("Should correctly filter yo subjects", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "2A", "2a"], - ["KEY", "key", "3A", "3a"], - ["KEY", "key", "4A", "4a"], - ["KEY", "key", "5A", "5a"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:05, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:11, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:17, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:23, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"yo", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"yo", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -847,15 +925,15 @@ describe("Settings", function() { it("Should correctly filter tú subjects", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "2B", "2b"], - ["KEY", "key", "3B", "3b"], - ["KEY", "key", "4B", "4b"], - ["KEY", "key", "5B", "5b"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:06, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:12, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:18, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:24, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"tú", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"tú", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -864,15 +942,15 @@ describe("Settings", function() { it("Should correctly filter él subjects", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "2C", "2c"], - ["KEY", "key", "3C", "3c"], - ["KEY", "key", "4C", "4c"], - ["KEY", "key", "5C", "5c"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:07, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:13, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:19, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:25, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"él", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"él", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -881,15 +959,15 @@ describe("Settings", function() { it("Should correctly filter nosotros subjects", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "2D", "2d"], - ["KEY", "key", "3D", "3d"], - ["KEY", "key", "4D", "4d"], - ["KEY", "key", "5D", "5d"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:08, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:14, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:20, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:26, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"nosotros", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"nosotros", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -898,30 +976,30 @@ describe("Settings", function() { it("Should correctly filter ellos subjects", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], - ["KEY", "key", "2E", "2e"], - ["KEY", "key", "3E", "3e"], - ["KEY", "key", "4E", "4e"], - ["KEY", "key", "5E", "5e"], + {set:"Verbs", outputIndex:0, inputIndex:03, filterIndex:02, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:09, filterIndex:04, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:15, filterIndex:10, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:21, filterIndex:16, filterValue:".*"}, + {set:"Verbs", outputIndex:0, inputIndex:27, filterIndex:22, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"all tenses", subject:"ellos", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"all tenses", subject:"ellos", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); }); }); - + describe("Direction filters", function() { it("Should correctly filter English to Conjugations", function() { // Initialize expected let expected = [ - ["KEY", "key", "1A", "1a"], + {set:"Verbs", outputIndex:0, inputIndex:3, filterIndex:2, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"present participles", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); + let actual = GetVerbFilters([{tense:"present participles", subject:"all subjects", type:"all types", direction:"Eng. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -930,11 +1008,11 @@ describe("Settings", function() { it("Should correctly filter Spanish to Conjugations", function() { // Initialize expected let expected = [ - ["SPANISH INF", "spanish inf", "1A", "1a"], + {set:"Verbs", outputIndex:1, inputIndex:3, filterIndex:2, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"present participles", subject:"all subjects", type:"all types", direction:"Esp. => Conj."}]); + let actual = GetVerbFilters([{tense:"present participles", subject:"all subjects", type:"all types", direction:"Esp. => Conj."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -943,11 +1021,11 @@ describe("Settings", function() { it("Should correctly filter Conjugations to English", function() { // Initialize expected let expected = [ - ["1A", "1a", "KEY", "key"], + {set:"Verbs", outputIndex:3, inputIndex:0, filterIndex:2, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"present participles", subject:"all subjects", type:"all types", direction:"Conj. => Eng."}]); + let actual = GetVerbFilters([{tense:"present participles", subject:"all subjects", type:"all types", direction:"Conj. => Eng."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -956,11 +1034,11 @@ describe("Settings", function() { it("Should correctly filter Conjugations to Spanish", function() { // Initialize expected let expected = [ - ["1A", "1a", "SPANISH INF", "spanish inf"], + {set:"Verbs", outputIndex:3, inputIndex:1, filterIndex:2, filterValue:".*"}, ]; // Filter verbs - let actual = ApplyVerbFilter(verbs, [{tense:"present participles", subject:"all subjects", type:"all types", direction:"Conj. => Esp."}]); + let actual = GetVerbFilters([{tense:"present participles", subject:"all subjects", type:"all types", direction:"Conj. => Esp."}]); // Assert filtered verbs are correct expect(actual).to.have.deep.members(expected); @@ -968,6 +1046,244 @@ describe("Settings", function() { }); }); + describe("ApplyFilters method", function() { + // Initialize vocab + let vocab = { + "set1": [ + ["Upper", "Lower", "Type1", "Type2"], + ["A", "a", "Noun", "Vowel"], + ["B", "b", "Adjective", "Consonant"], + ["C", "c", "Verb", "Consonant"], + ], + "set2": [ + ["Upper", "Lower", "Type1", "Type2"], + ["Z", "z", "Noun", "Consonant"], + ["Y", "y", "Adjective", "Vowel,Consonant"], + ["X", "x", "Verb", "Consonant"], + ], + }; + + it("Should correctly filter different vocab sets", function() { + // Initialize expected + let expected = [ + ["Upper", "A", "Lower", "a"], + ["Upper", "B", "Lower", "b"], + ["Upper", "C", "Lower", "c"], + ["Upper", "X", "Lower", "x"], + ["Upper", "Y", "Lower", "y"], + ["Upper", "Z", "Lower", "z"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab, [ + {set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + {set:"set2", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + ]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should correctly filter different outputIndexes", function() { + // Initialize expected + let expected = [ + ["Upper", "A", "Lower", "a"], + ["Upper", "B", "Lower", "b"], + ["Upper", "C", "Lower", "c"], + ["Type2", "Vowel", "Lower", "a"], + ["Type2", "Consonant", "Lower", "b"], + ["Type2", "Consonant", "Lower", "c"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab, [ + {set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + {set:"set1", outputIndex:3, inputIndex:1, filterIndex:2, filterValue:".*"}, + ]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should correctly filter different inputIndexes", function() { + // Initialize expected + let expected = [ + ["Upper", "A", "Lower", "a"], + ["Upper", "B", "Lower", "b"], + ["Upper", "C", "Lower", "c"], + ["Upper", "A", "Type2", "Vowel"], + ["Upper", "B", "Type2", "Consonant"], + ["Upper", "C", "Type2", "Consonant"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab, [ + {set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:".*"}, + {set:"set1", outputIndex:0, inputIndex:3, filterIndex:2, filterValue:".*"}, + ]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should correctly filter different filterIndexes and filtervalues", function() { + // Initialize expected + let expected = [ + ["Upper", "C", "Lower", "c"], + ["Upper", "A", "Lower", "a"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab, [ + {set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Verb"}, + {set:"set1", outputIndex:0, inputIndex:1, filterIndex:3, filterValue:"Vowel"}, + ]); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + describe("multiplePrompts setting", function() { + // Initialize vocab2 + let vocab2 = { + "set1": [ + ["Upper", "Lower", "Type1"], + ["A1, A2 , A3", "a", "Noun"], + ["B1, B2", "b", "Adjective"], + ["C", "c", "Verb"], + ], + }; + + it("Shouldn't effect single prompts", function() { + // Initialize expected + let expected = [ + ["Upper", "C", "Lower", "c"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab2, [{set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Verb"}], "Show separately"); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should't effect prompts if equal to 'Show together'", function() { + // Initialize expected + let expected = [ + ["Upper", "A1, A2 , A3", "Lower", "a"], + ["Upper", "B1, B2", "Lower", "b"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab2, [{set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Noun|Adjective"}], "Show together"); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should split up prompts if equal to 'Show separately'", function() { + // Initialize expected + let expected = [ + ["Upper", "A1", "Lower", "a"], + ["Upper", "A2", "Lower", "a"], + ["Upper", "A3", "Lower", "a"], + ["Upper", "B1", "Lower", "b"], + ["Upper", "B2", "Lower", "b"], + ]; + + // Call ApplyFilters + let actual = ApplyFilters(vocab2, [{set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Noun|Adjective"}], "Show separately"); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + }); + + it("Should correctly filter prompts if equal to 'Show one' (Math.random returns 0)", function() { + // Initialize expected + let expected = [ + ["Upper", "A1", "Lower", "a"], + ["Upper", "B1", "Lower", "b"], + ]; + + // Copy original Math.random method + let random = Math.random; + + try { + // Override Math.random method + Math.random = function() { + return 0; + } + + // Call ApplyFilters + let actual = ApplyFilters(vocab2, [{set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Noun|Adjective"}], "Show one"); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + } + finally { + // Restore Math.random method + Math.random = random; + } + }); + + it("Should correctly filter prompts if equal to 'Show one' (Math.random returns 0.5)", function() { + // Initialize expected + let expected = [ + ["Upper", "A2", "Lower", "a"], + ["Upper", "B1", "Lower", "b"], + ]; + + // Copy original Math.random method + let random = Math.random; + + try { + // Override Math.random method + Math.random = function() { + return 0.5; + } + + // Call ApplyFilters + let actual = ApplyFilters(vocab2, [{set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Noun|Adjective"}], "Show one"); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + } + finally { + // Restore Math.random method + Math.random = random; + } + }); + + it("Should correctly filter prompts if equal to 'Show one' (Math.random returns 1)", function() { + // Initialize expected + let expected = [ + ["Upper", "A3", "Lower", "a"], + ["Upper", "B2", "Lower", "b"], + ]; + + // Copy original Math.random method + let random = Math.random; + + try { + // Override Math.random method + Math.random = function() { + return 1; + } + + // Call ApplyFilters + let actual = ApplyFilters(vocab2, [{set:"set1", outputIndex:0, inputIndex:1, filterIndex:2, filterValue:"Noun|Adjective"}], "Show one"); + + // Assert filtered vocab is correct + expect(actual).to.have.deep.members(expected); + } + finally { + // Restore Math.random method + Math.random = random; + } + }); + }); + }); + describe("Shuffle method", function() { it("Should not alter list", function() { // Initialize list @@ -975,7 +1291,7 @@ describe("Settings", function() { // Shuffle list let list2 = Shuffle(list1); - + // Assert list shuffled expect(list2.length).to.equal(list1.length); for (let item of list2) { diff --git a/vocab/Adjectives.csv b/vocab/Adjectives.csv @@ -7,7 +7,7 @@ Blonde hair,Pelo rubio,Adjective Brown hair,Pelo castaño,Adjective Disorganized,Desorganizado,Adjective Fantastic,Fantástico,Adjective -Friendly,Amable,Adjective +"Friendly,Kind",Amable,Adjective Funny,Cómico,Adjective Good,Bueno,Adjective Good natured,Afable,Adjective @@ -16,7 +16,6 @@ Happy,Alegre,Adjective Hard working,Trabajador,Adjective Intelligent,Inteligente,Adjective Interesting,Interesante,Adjective -Kind,Amable,Adjective Lazy,Perezoso,Adjective Loving,Cariñoso,Adjective Nice,Simpático,Adjective diff --git a/vocab/Clothes.csv b/vocab/Clothes.csv @@ -33,8 +33,7 @@ Ring,El anillo,Noun Shirt,La camisa,Noun Shoes,Los zapatos,Noun Short Sleeve,La manga corta,Noun -Shorts,Los chorts,Noun -Shorts,Los pantalones cortos,Noun +Shorts,"Los chorts,Los pantalones cortos",Noun Silk,La seda,Noun Skirt,La falda,Noun Sleeve,La manga,Noun diff --git a/vocab/Health.csv b/vocab/Health.csv @@ -6,8 +6,7 @@ Apendicitis,El apendicitis,Noun Appointment,La consulta,Noun Blood,La sangre,Noun Cancer,El cáncer,Noun -Cast,El yeso,Noun -Plaster,El yeso,Noun +"Cast,Plaster",El yeso,Noun Chicken pox,La varicela,Noun Clinic,La clínica,Noun Cold,El resfriado,Noun @@ -16,14 +15,11 @@ Crutches,Las muletas,Noun Diarrhea,La diarrea,Noun Doctor,El médico,Noun Doctor's office,La oficina del médico,Noun -Fever,La fiebre,Noun Flu,La gripe,Noun Gloves,Los guantes,Noun Headache,El dolor de cabeza,Noun -Healthy,Sano,Adjective -Healthy,Saludable,Adjective -Heart Attack,El infarto,Noun -Heart Attack,El ataque de corazón,Noun +Healthy,"Sano,Saludable",Adjective +Heart Attack,"El infarto,El ataque de corazón",Noun Heavy,Pesado,Adjective Hospital,El hospital,Noun Infection,La infección,Noun @@ -42,13 +38,11 @@ Smallpox,La viruela,Noun Sore throat,El dolor de garganta,Noun Stomach ache,El dolor de estómago,Noun Surgery,La cirugía,Noun -Temperature,La fiebre,Noun -Temperature,La temperatura,Noun +"Temperature,Fever","La fiebre,La temperatura",Noun To cough,Toser,Verb To cure,Curar,Verb To die,Morir,Verb -To examine,Examinar,Verb -To examine,Revisar,Verb +To examine,"Examinar,Revisar",Verb To faint,Desmayarse,Verb To fall,Caerse,Verb To feel,Sentirse,Verb @@ -67,5 +61,4 @@ To sweat,Sudar,Verb To swell,Hincharse,Verb To throw up,Vomitar,Verb Vaccine,La vacuna,Noun -X-ray,Los rayos X,Noun -X-ray,La radiografía,Noun -\ No newline at end of file +X-ray,"Los rayos X,La radiografía",Noun +\ No newline at end of file diff --git a/vocab/House.csv b/vocab/House.csv @@ -12,7 +12,7 @@ Bedroom,La habitación,Noun Big,Grande,Adjective Bricks,Los ladrillos,Noun Calendar,El calendario,Noun -Carpet,La alfombra,Noun +"Carpet,Rug",La alfombra,Noun Ceiling,El techo,Noun Chair,La silla,Noun Chandelier,La araña de luces,Noun @@ -28,8 +28,7 @@ Dining room,El comedor,Noun Dishes,Los platos,Noun Dishwasher,El lavaplatos,Noun Dresser,La cómoda,Noun -Entry way,La entrada,Noun -Entry way,El recibidor,Noun +Entry way,"La entrada,El recibidor",Noun Floor,El piso,Noun Freezer,El congelador,Noun Furniture,Los muebles,Noun @@ -62,7 +61,6 @@ Pillow,La almohada,Noun Pots,Las ollas,Noun Quiet,Tranquilo,Adjective Refrigerator,La refrigeradora,Noun -Rug,La alfombra,Noun Sheets,Las sábanas,Noun Shelf,El estante,Noun Shower,La ducha,Noun @@ -73,12 +71,10 @@ Sofa,El sofá,Noun Spacious,Espacioso,Adjective Stapler,La grapadora,Noun Stone,La losa,Noun -Stove,La estufa,Noun -Stove,La cocina,Noun +Stove,"La estufa,La cocina",Noun Table,La mesa,Noun Tablecloth,El mantel,Noun -Television,El televisor,Noun -Television,La televisión,Noun +Television,"El televisor,La televisión",Noun To iron,Planchar,Verb To make the bed,Hacer la cama,Verb To mow the lawn,Cortar el césped,Verb diff --git a/vocab/Nature.csv b/vocab/Nature.csv @@ -7,8 +7,7 @@ Bear,El oso,Noun Beautiful,Bello,Adjective Better,Mejor,Adjective Biodiversity,La biodiversidad,Noun -Bird,El ave,Noun -Bird,El pájaro,Noun +Bird,"El ave,El pájaro",Noun Bonfire,La fogata,Noun Branch,La rama,Noun Calm,Tranquilo,Adjective @@ -66,8 +65,7 @@ Shore,La orilla,Noun Skunk,La mofeta,Noun Sleeping bag,El saco de dormir,Noun Sloth,El perezoso,Noun -Snake,La serpiente,Noun -Snake,La culebra,Noun +Snake,"La serpiente,La culebra",Noun Spider,La araña,Noun Squirrel,La ardilla,Noun Stars,Las estrellas,Noun @@ -80,8 +78,7 @@ To bring,Traer,Verb To brush,Cepillar,Verb To camp,Acampar,Verb To change,Cambiar,Verb -To climb,Escalar,Verb -To climb,Trepar,Verb +To climb,"Escalar,Trepar",Verb To close,Cerrar,Verb To count,Contar,Verb To fix,Arreglar,Verb diff --git a/vocab/Prepositions.csv b/vocab/Prepositions.csv @@ -1,32 +1,23 @@ English,Spanish,Type -About,Sobre,Preposition +"About,Over",Sobre,Preposition According to,Según,Preposition -After,Tras,Preposition -After,Después de,Preposition +After,"Tras,Después de",Preposition Against,Contra,Preposition -At,A,Preposition +"At,By means of,To",A,Preposition Before,Antes de,Preposition -Behind,Tras,Preposition -Behind,Detrás de,Preposition +Behind,"Tras,Detrás de",Preposition Between,Entre,Preposition By,Por,Preposition -By means of,A,Preposition -For,Por,Preposition -For,Para,Preposition -From,Desde,Preposition -In,En,Preposition -In front of,Delante de,Preposition -In front of,Enfrente de,Preposition +For,"Por,Para",Preposition +"From,Since",Desde,Preposition +"In,On",En,Preposition +In front of,"Delante de,Enfrente de",Preposition In order to,Para,Preposition Inside of,Dentro de,Preposition Near,Cerca de,Preposition Of,De,Preposition -On,En,Preposition On top of,Encima de,Preposition Outside of,Fuera de,Preposition -Over,Sobre,Preposition -Since,Desde,Preposition -To,A,Preposition Towards,Hacia,Preposition Under,Bajo,Preposition Until,Hasta,Preposition diff --git a/vocab/Professions.csv b/vocab/Professions.csv @@ -16,9 +16,7 @@ Executive,El ejecutivo,Noun Fireman,El bombero,Noun Full time,Todo tiempo,Noun Half time,Medio tiempo,Noun -Job,El empleo,Noun -Job,El trabajo,Noun -Job,El oficio,Noun +Job,"El empleo,El trabajo,El oficio",Noun Lawyer,El abogado,Noun Meeting,La reunión,Noun Nurse,El enfermero,Noun diff --git a/vocab/Transitions.csv b/vocab/Transitions.csv @@ -1,20 +1,17 @@ English,Spanish,Type Additionally,Adicionalmente,Other Afterwards,Más tarde,Other -Although,Aunque,Other +"Although,Even if",Aunque,Other As long as,Siempre que,Other As soon as,Apenas,Other -As,Como,Other -As,Ya que,Other +As,"Como,Ya que",Other At first,Al principio,Other At last,Al final,Other Because of,A causa de,Other But,Pero,Other Despite,A pesar de,Other During,Durante,Other -Even if,Aunque,Other -Finally,Finalmente,Other -Finally,Por último,Other +Finally,"Finalmente,Por último",Other First and foremost,Ante todo,Other First,Primero,Other For example,Por ejemplo,Other @@ -31,14 +28,11 @@ Now that,Ahora que,Other Now,Ahora,Other On the other hand,Por otro lado,Other Second,Segundo,Other -Since,Como,Other -Since,Desde,Other -Since,Ya que,Other +Since,"Como,Desde,Ya que",Other So,Entonces,Other Thanks to,Gracias a,Other That's why,Por eso,Other -Then,Entonces,Other -Then,Luego,Other +Then,"Entonces,Luego",Other Therefore,Por lo tanto,Other Thus,Así,Other To begin,Para empezar,Other diff --git a/vocab/Vacation.csv b/vocab/Vacation.csv @@ -1,6 +1,6 @@ English,Spanish,Type Bakery,La panadería,Noun -Beautiful,Bello,Adjective +"Beautiful,Nice",Bello,Adjective Bus stop,La parada de autobus,Noun Butcher,La carnicería,Noun Cafeteria,La cafetería,Noun @@ -30,7 +30,6 @@ Jewelry,Las joyas,Noun Key,La llave,Noun Library,La librería,Noun Lodging,El alojamiento,Noun -Nice,Bello,Adjective Open-air market,El mercado al aire libre,Noun Paper store,La papelería,Noun Pet store,La tienda de mascotas,Noun @@ -54,8 +53,7 @@ To ride a horse,Montar a caballo,Verb To send postcards,Mandar tarjetas postales,Verb To take photos,Tomar fotos,Verb To visit a museum,Visitar un museo,Verb -Too high,Demasiado,Adjective -Too much,Demasiado,Adjective +"Too high,Too much",Demasiado,Adjective Tourist office,La oficina de turismo,Noun Tourist,El turista,Noun Toy store,La juguetería,Noun diff --git a/vocab/Verbs.csv b/vocab/Verbs.csv @@ -16,7 +16,7 @@ To clean,Limpiar,Regular,Limpiando,Regular,Limpio,Limpias,Limpia,Limpiamos,Limpi To come,Venir,Stem Changing,Viniendo,"Irregular, Stem Changing",Vengo,Vienes,Viene,Venimos,Vienen,Irregular,Vine,Viniste,Vino,Vinimos,Vinieron,Regular,Venía,Venías,Venía,Veníamos,Venían,Irregular,Vendré,Vendrás,Vendrá,Vendremos,Vendrán To dance,Bailar,Regular,Bailando,Regular,Bailo,Bailas,Baila,Bailamos,Bailan,Regular,Bailé,Bailaste,Bailó,Bailamos,Bailaron,Regular,Bailaba,Bailabas,Bailaba,Bailábamos,Bailaban,Regular,Bailaré,Bailarás,Bailará,Bailaremos,Bailarán To die,Morir,Stem Changing,Muriendo,Stem Changing,Muero,Mueres,Muere,Morimos,Mueren,Stem Changing,Morí,Moriste,Murió,Morimos,Murieron,Regular,Moría,Morías,Moría,Moríamos,Morían,Regular,Moriré,Morirás,Morirá,Moriremos,Morirán -To do,Hacer,Regular,Haciendo,Irregular,Hago,Haces,Hace,Hacemos,Hacen,Irregular,Hice,Hiciste,Hizo,Hicimos,Hicieron,Regular,Hacía,Hacías,Hacía,Hacíamos,Hacían,Irregular,Haré,Harás,Hará,Haremos,Harán +"To do,To make",Hacer,Regular,Haciendo,Irregular,Hago,Haces,Hace,Hacemos,Hacen,Irregular,Hice,Hiciste,Hizo,Hicimos,Hicieron,Regular,Hacía,Hacías,Hacía,Hacíamos,Hacían,Irregular,Haré,Harás,Hará,Haremos,Harán To draw,Dibujar,Regular,Dibujando,Regular,Dibujo,Dibujas,Dibuja,Dibujamos,Dibujan,Regular,Dibujé,Dibujaste,Dibujó,Dibujamos,Dibujaron,Regular,Dibujaba,Dibujabas,Dibujaba,Dibujábamos,Dibujaban,Regular,Dibujaré,Dibujarás,Dibujará,Dibujaremos,Dibujarán To drink,Beber,Regular,Bebiendo,Regular,Bebo,Bebes,Bebe,Bebemos,Beben,Regular,Bebí,Bebiste,Bebió,Bebimos,Bebieron,Regular,Bebía,Bebías,Bebía,Bebíamos,Bebían,Regular,Beberé,Beberás,Beberá,Beberemos,Beberán To eat,Comer,Regular,Comiendo,Regular,Como,Comes,Come,Comemos,Comen,Regular,Comí,Comiste,Comió,Comimos,Comieron,Regular,Comía,Comías,Comía,Comíamos,Comían,Regular,Comeré,Comerás,Comerá,Comeremos,Comerán @@ -25,12 +25,12 @@ To eat dinner,Cenar,Regular,Cenando,Regular,Ceno,Cenas,Cena,Cenamos,Cenan,Regula To eat lunch,Almorzar,Regular,Almorzando,Stem Changing,Almuerzo,Almuerzas,Almuerza,Almorzamos,Almuerzan,Orthographic,Almorcé,Almorzaste,Almorzó,Almorzamos,Almorzaron,Regular,Almorzaba,Almorzabas,Almorzaba,Almorzábamos,Almorzaban,Regular,Almorzaré,Almorzarás,Almorzará,Almorzaremos,Almorzarán To enjoy oneself,Divertirse,Stem Changing,Divirtiendo,"Reflexive, Stem Changing",Me divierto,Te diviertes,Se divierte,Nos divertimos,Se divierten,"Reflexive, Stem Changing",Me divertí,Te divertiste,Se divirtió,Nos divertimos,Se divirtieron,"Reflexive, Regular",Me divertía,Te divertías,Se divertía,Nos divertíamos,Se divertían,Regular,Me divertiré,Te divertirás,Se divertirá,Nos divertiremos,Se divertirán To feel,Sentirse,Stem Changing,Sintiendo,"Reflexive, Stem Changing",Me siento,Te sientes,Se siente,Nos sentimos,Se sienten,"Reflexive, Stem Changing",Me sentí,Te sentiste,Se sintió,Nos sentimos,Se sintieron,"Reflexive, Regular",Me sentía,Te sentías,Se sentía,Nos sentíamos,Se sentían,Regular,Me sentiré,Te sentirás,Se sentirá,Nos sentiremos,Se sentirán -To find,Encontrar,Regular,Encontrando,Stem Changing,Encuentro,Encuentras,Encuentra,Encontramos,Encuentran,Regular,Encontré,Encontraste,Encontró,Encontramos,Encontraron,Regular,Encontraba,Encontrabas,Encontraba,Encontrábamos,Encontraban,Regular,Encontraré,Encontrarás,Encontrará,Encontraremos,Encontrarán +"To find,To meet",Encontrar,Regular,Encontrando,Stem Changing,Encuentro,Encuentras,Encuentra,Encontramos,Encuentran,Regular,Encontré,Encontraste,Encontró,Encontramos,Encontraron,Regular,Encontraba,Encontrabas,Encontraba,Encontrábamos,Encontraban,Regular,Encontraré,Encontrarás,Encontrará,Encontraremos,Encontrarán To get up,Levantarse,Regular,Levantando,"Reflexive, Regular",Me levanto,Te levantas,Se levanta,Nos levantamos,Se levantan,"Reflexive, Regular",Me levanté,Te levantaste,Se levantó,Nos levantamos,Se levantaron,"Reflexive, Regular",Me levantaba,Te levantabas,Se levantaba,Nos levantábamos,Se levantaban,Regular,Me levantaré,Te levantarás,Se levantará,Nos levantaremos,Se levantarán To give,Dar,Regular,Dando,Irregular,Doy,Das,Da,Damos,Dan,Irregular,Di,Diste,Dio,Dimos,Dieron,Regular,Daba,Dabas,Daba,Dábamos,Daban,Regular,Daré,Darás,Dará,Daremos,Darán To go,Ir,Irregular,Yendo,Irregular,Voy,Vas,Va,Vamos,Van,Irregular,Fui,Fuiste,Fue,Fuimos,Fueron,Irregular,Iba,Ibas,Iba,Íbamos,Iban,Regular,Iré,Irás,Irá,Iremos,Irán To go to bed,Acostarse,Regular,Acostando,"Reflexive, Stem Changing",Me acuesto,Te acuestas,Se acuesta,Nos acostamos,Se acuestan,"Reflexive, Regular",Me acosté,Te acostaste,Se acostó,Nos acostamos,Se acostaron,"Reflexive, Regular",Me acostaba,Te acostabas,Se acostaba,Nos acostábamos,Se acostaban,Regular,Me acostaré,Te acostarás,Se acostará,Nos acostaremos,Se acostarán -To happen,Pasar,Regular,Pasando,Regular,Paso,Pasas,Pasa,Pasamos,Pasan,Regular,Pasé,Pasaste,Pasó,Pasamos,Pasaron,Regular,Pasaba,Pasabas,Pasaba,Pasábamos,Pasaban,Regular,Pasaré,Pasarás,Pasará,Pasaremos,Pasarán +"To happen,To spend time",Pasar,Regular,Pasando,Regular,Paso,Pasas,Pasa,Pasamos,Pasan,Regular,Pasé,Pasaste,Pasó,Pasamos,Pasaron,Regular,Pasaba,Pasabas,Pasaba,Pasábamos,Pasaban,Regular,Pasaré,Pasarás,Pasará,Pasaremos,Pasarán To have,Tener,Regular,Teniendo,"Irregular, Stem Changing",Tengo,Tienes,Tiene,Tenemos,Tienen,Irregular,Tuve,Tuviste,Tuvo,Tuvimos,Tuvieron,Regular,Tenía,Tenías,Tenía,Teníamos,Tenían,Irregular,Tendré,Tendrás,Tendrá,Tendremos,Tendrán To know,Saber,Regular,Sabiendo,Irregular,Sé,Sabes,Sabe,Sabemos,Saben,Irregular,Supe,Supiste,Supo,Supimos,Supieron,Regular,Sabía,Sabías,Sabía,Sabíamos,Sabían,Irregular,Sabré,Sabrás,Sabrá,Sabremos,Sabrán To know,Conocer,Regular,Conociendo,Irregular,Conozco,Conoces,Conoce,Conocemos,Conocen,Regular,Conocí,Conociste,Conoció,Conocimos,Conocieron,Regular,Conocía,Conocías,Conocía,Conocíamos,Conocían,Regular,Conoceré,Conocerás,Conocerá,Conoceremos,Conocerán @@ -38,12 +38,10 @@ To learn,Aprender,Regular,Aprendiendo,Regular,Aprendo,Aprendes,Aprende,Aprendemo To leave,Salir,Regular,Saliendo,Irregular,Salgo,Sales,Sale,Salimos,Salen,Regular,Salí,Saliste,Salió,Salimos,Salieron,Regular,Salía,Salías,Salía,Salíamos,Salían,Irregular,Saldré,Saldrás,Saldrá,Saldremos,Saldrán To listen,Escuchar,Regular,Escuchando,Regular,Escucho,Escuchas,Escucha,Escuchamos,Escuchan,Regular,Escuché,Escuchaste,Escuchó,Escuchamos,Escucharon,Regular,Escuchaba,Escuchabas,Escuchaba,Escuchábamos,Escuchaban,Regular,Escucharé,Escucharás,Escuchará,Escucharemos,Escucharán To live,Vivir,Regular,Viviendo,Regular,Vivo,Vives,Vive,Vivimos,Viven,Regular,Viví,Viviste,Vivió,Vivimos,Vivieron,Regular,Vivía,Vivías,Vivía,Vivíamos,Vivían,Regular,Viviré,Vivirás,Vivirá,Viviremos,Vivirán -To look,Mirar,Regular,Mirando,Regular,Miro,Miras,Mira,Miramos,Miran,Regular,Miré,Miraste,Miró,Miramos,Miraron,Regular,Miraba,Mirabas,Miraba,Mirábamos,Miraban,Regular,Miraré,Mirarás,Mirará,Miraremos,Mirarán +"To look,To watch",Mirar,Regular,Mirando,Regular,Miro,Miras,Mira,Miramos,Miran,Regular,Miré,Miraste,Miró,Miramos,Miraron,Regular,Miraba,Mirabas,Miraba,Mirábamos,Miraban,Regular,Miraré,Mirarás,Mirará,Miraremos,Mirarán To look for,Buscar,Regular,Buscando,Regular,Busco,Buscas,Busca,Buscamos,Buscan,Orthographic,Busqué,Buscaste,Buscó,Buscamos,Buscaron,Regular,Buscaba,Buscabas,Buscaba,Buscábamos,Buscaban,Regular,Buscaré,Buscarás,Buscará,Buscaremos,Buscarán To lose,Perder,Regular,Perdiendo,Stem Changing,Pierdo,Pierdes,Pierde,Perdemos,Pierden,Regular,Perdí,Perdiste,Perdió,Perdimos,Perdieron,Regular,Perdía,Perdías,Perdía,Perdíamos,Perdían,Regular,Perderé,Perderás,Perderá,Perderemos,Perderán -To make,Hacer,Regular,Haciendo,Irregular,Hago,Haces,Hace,Hacemos,Hacen,Irregular,Hice,Hiciste,Hizo,Hicimos,Hicieron,Regular,Hacía,Hacías,Hacía,Hacíamos,Hacían,Irregular,Haré,Harás,Hará,Haremos,Harán -To meet,Encontrar,Regular,Encontrando,Stem Changing,Encuentro,Encuentras,Encuentra,Encontramos,Encuentran,Regular,Encontré,Encontraste,Encontró,Encontramos,Encontraron,Regular,Encontraba,Encontrabas,Encontraba,Encontrábamos,Encontraban,Regular,Encontraré,Encontrarás,Encontrará,Encontraremos,Encontrarán -To mount,Montar,Regular,Montando,Regular,Monto,Montas,Monta,Montamos,Montan,Regular,Monté,Montaste,Montó,Montamos,Montaron,Regular,Montaba,Montabas,Montaba,Montábamos,Montaban,Regular,Montaré,Montarás,Montará,Montaremos,Montarán +"To mount,To ride",Montar,Regular,Montando,Regular,Monto,Montas,Monta,Montamos,Montan,Regular,Monté,Montaste,Montó,Montamos,Montaron,Regular,Montaba,Montabas,Montaba,Montábamos,Montaban,Regular,Montaré,Montarás,Montará,Montaremos,Montarán To need,Necesitar,Regular,Necesitando,Regular,Necesito,Necesitas,Necesita,Necesitamos,Necesitan,Regular,Necesité,Necesitaste,Necesitó,Necesitamos,Necesitaron,Regular,Necesitaba,Necesitabas,Necesitaba,Necesitábamos,Necesitaban,Regular,Necesitaré,Necesitarás,Necesitará,Necesitaremos,Necesitarán To organize,Organizar,Regular,Organizando,Regular,Organizo,Organizas,Organiza,Organizamos,Organizan,Orthographic,Organicé,Organizaste,Organizó,Organizamos,Organizaron,Regular,Organizaba,Organizabas,Organizaba,Organizábamos,Organizaban,Regular,Organizaré,Organizarás,Organizará,Organizaremos,Organizarán To ought to,Deber,Regular,Debiendo,Regular,Debo,Debes,Debe,Debemos,Deben,Regular,Debí,Debiste,Debió,Debimos,Debieron,Regular,Debía,Debías,Debía,Debíamos,Debían,Regular,Deberé,Deberás,Deberá,Deberemos,Deberán @@ -56,23 +54,20 @@ To read,Leer,Irregular,Leyendo,Regular,Leo,Lees,Lee,Leemos,Leen,Orthographic,Le To receive,Recibir,Regular,Recibiendo,Regular,Recibo,Recibes,Recibe,Recibimos,Reciben,Regular,Recibí,Recibiste,Recibió,Recibimos,Recibieron,Regular,Recibía,Recibías,Recibía,Recibíamos,Recibían,Regular,Recibiré,Recibirás,Recibirá,Recibiremos,Recibirán To relax,Descansar,Regular,Descansando,Regular,Descanso,Descansas,Descansa,Descansamos,Descansan,Regular,Descansé,Descansaste,Descansó,Descansamos,Descansaron,Regular,Descansaba,Descansabas,Descansaba,Descansábamos,Descansaban,Regular,Descansaré,Descansarás,Descansará,Descansaremos,Descansarán To return,Regresar,Regular,Regresando,Regular,Regreso,Regresas,Regresa,Regresamos,Regresan,Regular,Regresé,Regresaste,Regresó,Regresamos,Regresaron,Regular,Regresaba,Regresabas,Regresaba,Regresábamos,Regresaban,Regular,Regresaré,Regresarás,Regresará,Regresaremos,Regresarán -To ride,Montar,Regular,Montando,Regular,Monto,Montas,Monta,Montamos,Montan,Regular,Monté,Montaste,Montó,Montamos,Montaron,Regular,Montaba,Montabas,Montaba,Montábamos,Montaban,Regular,Montaré,Montarás,Montará,Montaremos,Montarán To run,Correr,Regular,Corriendo,Regular,Corro,Corres,Corre,Corremos,Corren,Regular,Corrí,Corriste,Corrió,Corrimos,Corrieron,Regular,Corría,Corrías,Corría,Corríamos,Corrían,Regular,Correré,Correrás,Correrá,Correremos,Correrán -To say,Decir,Stem Changing,Diciendo,"Irregular, Stem Changing",Digo,Dices,Dice,Decimos,Dicen,Irregular,Dije,Dijiste,Dijo,Dijimos,Dijeron,Regular,Decía,Decías,Decía,Decíamos,Decían,Irregular,Diré,Dirás,Dirá,Diremos,Dirán +"To say,To tell",Decir,Stem Changing,Diciendo,"Irregular, Stem Changing",Digo,Dices,Dice,Decimos,Dicen,Irregular,Dije,Dijiste,Dijo,Dijimos,Dijeron,Regular,Decía,Decías,Decía,Decíamos,Decían,Irregular,Diré,Dirás,Dirá,Diremos,Dirán To see,Ver,Regular,Viendo,Irregular,Veo,Ves,Ve,Vemos,Ven,Irregular,Vi,Viste,Vio,Vimos,Vieron,Irregular,Veía,Veías,Veía,Veíamos,Veían,Regular,Veré,Verás,Verá,Veremos,Verán To show,Mostrar,Regular,Mostrando,Stem Changing,Muestro,Muestras,Muestra,Mostramos,Muestran,Regular,Mostré,Mostraste,Mostró,Mostramos,Mostraron,Regular,Mostraba,Mostrabas,Mostraba,Mostrábamos,Mostraban,Regular,Mostraré,Mostrarás,Mostrará,Mostraremos,Mostrarán To sing,Cantar,Regular,Cantando,Regular,Canto,Cantas,Canta,Cantamos,Cantan,Regular,Canté,Cantaste,Cantó,Cantamos,Cantaron,Regular,Cantaba,Cantabas,Cantaba,Cantábamos,Cantaban,Regular,Cantaré,Cantarás,Cantará,Cantaremos,Cantarán To sleep,Dormir,Stem Changing,Durmiendo,Stem Changing,Duermo,Duermes,Duerme,Dormimos,Duermen,Stem Changing,Dormí,Dormiste,Durmió,Dormimos,Durmieron,Regular,Dormía,Dormías,Dormía,Dormíamos,Dormían,Regular,Dormiré,Dormirás,Dormirá,Dormiremos,Dormirán To speak,Hablar,Regular,Hablando,Regular,Hablo,Hablas,Habla,Hablamos,Hablan,Regular,Hablé,Hablaste,Habló,Hablamos,Hablaron,Regular,Hablaba,Hablabas,Hablaba,Hablábamos,Hablaban,Regular,Hablaré,Hablarás,Hablará,Hablaremos,Hablarán -To spend time,Pasar,Regular,Pasando,Regular,Paso,Pasas,Pasa,Pasamos,Pasan,Regular,Pasé,Pasaste,Pasó,Pasamos,Pasaron,Regular,Pasaba,Pasabas,Pasaba,Pasábamos,Pasaban,Regular,Pasaré,Pasarás,Pasará,Pasaremos,Pasarán To study,Estudiar,Regular,Estudiando,Regular,Estudio,Estudias,Estudia,Estudiamos,Estudian,Regular,Estudié,Estudiaste,Estudió,Estudiamos,Estudiaron,Regular,Estudiaba,Estudiabas,Estudiaba,Estudiábamos,Estudiaban,Regular,Estudiaré,Estudiarás,Estudiará,Estudiaremos,Estudiarán To swim,Nadar,Regular,Nadando,Regular,Nado,Nadas,Nada,Nadamos,Nadan,Regular,Nadé,Nadaste,Nadó,Nadamos,Nadaron,Regular,Nadaba,Nadabas,Nadaba,Nadábamos,Nadaban,Regular,Nadaré,Nadarás,Nadará,Nadaremos,Nadarán To take,Tomar,Regular,Tomando,Regular,Tomo,Tomas,Toma,Tomamos,Toman,Regular,Tomé,Tomaste,Tomó,Tomamos,Tomaron,Regular,Tomaba,Tomabas,Tomaba,Tomábamos,Tomaban,Regular,Tomaré,Tomarás,Tomará,Tomaremos,Tomarán -To take,Llevar,Regular,Llevando,Regular,Llevo,Llevas,Lleva,Llevamos,Llevan,Regular,Llevé,Llevaste,Llevó,Llevamos,Llevaron,Regular,Llevaba,Llevabas,Llevaba,Llevábamos,Llevaban,Regular,Llevaré,Llevarás,Llevará,Llevaremos,Llevarán +"To take,To wear",Llevar,Regular,Llevando,Regular,Llevo,Llevas,Lleva,Llevamos,Llevan,Regular,Llevé,Llevaste,Llevó,Llevamos,Llevaron,Regular,Llevaba,Llevabas,Llevaba,Llevábamos,Llevaban,Regular,Llevaré,Llevarás,Llevará,Llevaremos,Llevarán To take care of,Cuidar,Regular,Cuidando,Regular,Cuido,Cuidas,Cuida,Cuidamos,Cuidan,Regular,Cuidé,Cuidaste,Cuidó,Cuidamos,Cuidaron,Regular,Cuidaba,Cuidabas,Cuidaba,Cuidábamos,Cuidaban,Regular,Cuidaré,Cuidarás,Cuidará,Cuidaremos,Cuidarán To take out,Sacar,Regular,Sacando,Regular,Saco,Sacas,Saca,Sacamos,Sacan,Orthographic,Saqué,Sacaste,Sacó,Sacamos,Sacaron,Regular,Sacaba,Sacabas,Sacaba,Sacábamos,Sacaban,Regular,Sacaré,Sacarás,Sacará,Sacaremos,Sacarán To teach,Enseñar,Regular,Enseñando,Regular,Enseño,Enseñas,Enseña,Enseñamos,Enseñan,Regular,Enseñé,Enseñaste,Enseñó,Enseñamos,Enseñaron,Regular,Enseñaba,Enseñabas,Enseñaba,Enseñábamos,Enseñaban,Regular,Enseñaré,Enseñarás,Enseñará,Enseñaremos,Enseñarán -To tell,Decir,Stem Changing,Diciendo,"Irregular, Stem Changing",Digo,Dices,Dice,Decimos,Dicen,Irregular,Dije,Dijiste,Dijo,Dijimos,Dijeron,Regular,Decía,Decías,Decía,Decíamos,Decían,Irregular,Diré,Dirás,Dirá,Diremos,Dirán To think,Pensar,Regular,Pensando,Stem Changing,Pienso,Piensas,Piensa,Pensamos,Piensan,Regular,Pensé,Pensaste,Pensó,Pensamos,Pensaron,Regular,Pensaba,Pensabas,Pensaba,Pensábamos,Pensaban,Regular,Pensaré,Pensarás,Pensará,Pensaremos,Pensarán To touch,Tocar,Regular,Tocando,Regular,Toco,Tocas,Toca,Tocamos,Tocan,Orthographic,Toqué,Tocaste,Tocó,Tocamos,Tocaron,Regular,Tocaba,Tocabas,Tocaba,Tocábamos,Tocaban,Regular,Tocaré,Tocarás,Tocará,Tocaremos,Tocarán To travel,Viajar,Regular,Viajando,Regular,Viajo,Viajas,Viaja,Viajamos,Viajan,Regular,Viajé,Viajaste,Viajó,Viajamos,Viajaron,Regular,Viajaba,Viajabas,Viajaba,Viajábamos,Viajaban,Regular,Viajaré,Viajarás,Viajará,Viajaremos,Viajarán @@ -81,8 +76,6 @@ To wake up,Despertarse,Regular,Despertando,"Reflexive, Stem Changing",Me despier To walk,Caminar,Regular,Caminando,Regular,Camino,Caminas,Camina,Caminamos,Caminan,Regular,Caminé,Caminaste,Caminó,Caminamos,Caminaron,Regular,Caminaba,Caminabas,Caminaba,Caminábamos,Caminaban,Regular,Caminaré,Caminarás,Caminará,Caminaremos,Caminarán To want,Querer,Regular,Queriendo,Stem Changing,Quiero,Quieres,Quiere,Queremos,Quieren,Irregular,Quise,Quisiste,Quiso,Quisimos,Quisieron,Regular,Quería,Querías,Quería,Queríamos,Querían,Irregular,Querré,Querrás,Querrá,Querremos,Querrán To wash,Lavar,Regular,Lavando,Regular,Lavo,Lavas,Lava,Lavamos,Lavan,Regular,Lavé,Lavaste,Lavó,Lavamos,Lavaron,Regular,Lavaba,Lavabas,Lavaba,Lavábamos,Lavaban,Regular,Lavaré,Lavarás,Lavará,Lavaremos,Lavarán -To watch,Mirar,Regular,Mirando,Regular,Miro,Miras,Mira,Miramos,Miran,Regular,Miré,Miraste,Miró,Miramos,Miraron,Regular,Miraba,Mirabas,Miraba,Mirábamos,Miraban,Regular,Miraré,Mirarás,Mirará,Miraremos,Mirarán -To wear,Llevar,Regular,Llevando,Regular,Llevo,Llevas,Lleva,Llevamos,Llevan,Regular,Llevé,Llevaste,Llevó,Llevamos,Llevaron,Regular,Llevaba,Llevabas,Llevaba,Llevábamos,Llevaban,Regular,Llevaré,Llevarás,Llevará,Llevaremos,Llevarán To win,Ganar,Regular,Ganando,Regular,Gano,Ganas,Gana,Ganamos,Ganan,Regular,Gané,Ganaste,Ganó,Ganamos,Ganaron,Regular,Ganaba,Ganabas,Ganaba,Ganábamos,Ganaban,Regular,Ganaré,Ganarás,Ganará,Ganaremos,Ganarán To work,Trabajar,Regular,Trabajando,Regular,Trabajo,Trabajas,Trabaja,Trabajamos,Trabajan,Regular,Trabajé,Trabajaste,Trabajó,Trabajamos,Trabajaron,Regular,Trabajaba,Trabajabas,Trabajaba,Trabajábamos,Trabajaban,Regular,Trabajaré,Trabajarás,Trabajará,Trabajaremos,Trabajarán To write,Escribir,Regular,Escribiendo,Regular,Escribo,Escribes,Escribe,Escribimos,Escriben,Regular,Escribí,Escribiste,Escribió,Escribimos,Escribieron,Regular,Escribía,Escribías,Escribía,Escribíamos,Escribían,Regular,Escribiré,Escribirás,Escribirá,Escribiremos,Escribirán \ No newline at end of file