summaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/language/es/spanish-transforms.js490
1 files changed, 456 insertions, 34 deletions
diff --git a/ext/js/language/es/spanish-transforms.js b/ext/js/language/es/spanish-transforms.js
index 54022fd5..dc4fc5a5 100644
--- a/ext/js/language/es/spanish-transforms.js
+++ b/ext/js/language/es/spanish-transforms.js
@@ -38,6 +38,19 @@ function addAccent(char) {
export const spanishTransforms = {
language: 'es',
conditions: {
+ n: {
+ name: 'Noun',
+ isDictionaryForm: true,
+ subConditions: ['ns', 'np'],
+ },
+ np: {
+ name: 'Noun plural',
+ isDictionaryForm: false,
+ },
+ ns: {
+ name: 'Noun singular',
+ isDictionaryForm: false,
+ },
v: {
name: 'Verb',
isDictionaryForm: true,
@@ -45,28 +58,15 @@ export const spanishTransforms = {
},
v_ar: {
name: '-ar verb',
- isDictionaryForm: true,
+ isDictionaryForm: false,
},
v_er: {
name: '-er verb',
- isDictionaryForm: true,
+ isDictionaryForm: false,
},
v_ir: {
name: '-ir verb',
- isDictionaryForm: true,
- },
- n: {
- name: 'Noun',
- isDictionaryForm: true,
- subConditions: ['ns', 'np'],
- },
- np: {
- name: 'Noun plural',
- isDictionaryForm: true,
- },
- ns: {
- name: 'Noun singular',
- isDictionaryForm: true,
+ isDictionaryForm: false,
},
adj: {
name: 'Adjective',
@@ -97,26 +97,26 @@ export const spanishTransforms = {
description: 'Present indicative form of a verb',
rules: [
// -ar verbs
- suffixInflection('o', 'ar', ['v'], ['v']),
- suffixInflection('as', 'ar', ['v'], ['v']),
- suffixInflection('a', 'ar', ['v'], ['v']),
- suffixInflection('amos', 'ar', ['v'], ['v']),
- suffixInflection('áis', 'ar', ['v'], ['v']),
- suffixInflection('an', 'ar', ['v'], ['v']),
+ suffixInflection('o', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('as', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('a', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('amos', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('áis', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('an', 'ar', ['v_ar'], ['v_ar']),
// -er verbs
- suffixInflection('o', 'er', ['v'], ['v']),
- suffixInflection('es', 'er', ['v'], ['v']),
- suffixInflection('e', 'er', ['v'], ['v']),
- suffixInflection('emos', 'er', ['v'], ['v']),
- suffixInflection('éis', 'er', ['v'], ['v']),
- suffixInflection('en', 'er', ['v'], ['v']),
+ suffixInflection('o', 'er', ['v_er'], ['v_er']),
+ suffixInflection('es', 'er', ['v_er'], ['v_er']),
+ suffixInflection('e', 'er', ['v_er'], ['v_er']),
+ suffixInflection('emos', 'er', ['v_er'], ['v_er']),
+ suffixInflection('éis', 'er', ['v_er'], ['v_er']),
+ suffixInflection('en', 'er', ['v_er'], ['v_er']),
// -ir verbs
- suffixInflection('o', 'ir', ['v'], ['v']),
- suffixInflection('es', 'ir', ['v'], ['v']),
- suffixInflection('e', 'ir', ['v'], ['v']),
- suffixInflection('imos', 'ir', ['v'], ['v']),
- suffixInflection('ís', 'ir', ['v'], ['v']),
- suffixInflection('en', 'ir', ['v'], ['v']),
+ suffixInflection('o', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('es', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('e', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('imos', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ís', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('en', 'ir', ['v_ir'], ['v_ir']),
// -tener verbs
suffixInflection('tengo', 'tener', ['v'], ['v']),
suffixInflection('tienes', 'tener', ['v'], ['v']),
@@ -167,5 +167,427 @@ export const spanishTransforms = {
wholeWordInflection('han', 'haber', ['v'], ['v']),
],
},
+ 'preterite': {
+ name: 'preterite',
+ description: 'Preterite (past) form of a verb',
+ rules: [
+ // -ar verbs
+ suffixInflection('é', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('aste', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('ó', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('amos', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('asteis', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('aron', 'ar', ['v_ar'], ['v_ar']),
+ // -er verbs
+ suffixInflection('í', 'er', ['v_er'], ['v_er']),
+ suffixInflection('iste', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ió', 'er', ['v_er'], ['v_er']),
+ suffixInflection('imos', 'er', ['v_er'], ['v_er']),
+ suffixInflection('isteis', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ieron', 'er', ['v_er'], ['v_er']),
+ // -ir verbs
+ suffixInflection('í', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('iste', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ió', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('imos', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('isteis', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ieron', 'ir', ['v_ir'], ['v_ir']),
+ // -car, -gar, -zar verbs
+ suffixInflection('qué', 'car', ['v'], ['v']),
+ suffixInflection('gué', 'gar', ['v'], ['v']),
+ suffixInflection('cé', 'zar', ['v'], ['v']),
+ // -uir verbs
+ suffixInflection('í', 'uir', ['v'], ['v']),
+ // Verbs with irregular forms
+ wholeWordInflection('fui', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuiste', 'ser', ['v'], ['v']),
+ wholeWordInflection('fue', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuimos', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuisteis', 'ser', ['v'], ['v']),
+ wholeWordInflection('fueron', 'ser', ['v'], ['v']),
+ wholeWordInflection('fui', 'ir', ['v'], ['v']),
+ wholeWordInflection('fuiste', 'ir', ['v'], ['v']),
+ wholeWordInflection('fue', 'ir', ['v'], ['v']),
+ wholeWordInflection('fuimos', 'ir', ['v'], ['v']),
+ wholeWordInflection('fuisteis', 'ir', ['v'], ['v']),
+ wholeWordInflection('fueron', 'ir', ['v'], ['v']),
+ wholeWordInflection('di', 'dar', ['v'], ['v']),
+ wholeWordInflection('diste', 'dar', ['v'], ['v']),
+ wholeWordInflection('dio', 'dar', ['v'], ['v']),
+ wholeWordInflection('dimos', 'dar', ['v'], ['v']),
+ wholeWordInflection('disteis', 'dar', ['v'], ['v']),
+ wholeWordInflection('dieron', 'dar', ['v'], ['v']),
+ suffixInflection('hice', 'hacer', ['v'], ['v']),
+ suffixInflection('hiciste', 'hacer', ['v'], ['v']),
+ suffixInflection('hizo', 'hacer', ['v'], ['v']),
+ suffixInflection('hicimos', 'hacer', ['v'], ['v']),
+ suffixInflection('hicisteis', 'hacer', ['v'], ['v']),
+ suffixInflection('hicieron', 'hacer', ['v'], ['v']),
+ suffixInflection('puse', 'poner', ['v'], ['v']),
+ suffixInflection('pusiste', 'poner', ['v'], ['v']),
+ suffixInflection('puso', 'poner', ['v'], ['v']),
+ suffixInflection('pusimos', 'poner', ['v'], ['v']),
+ suffixInflection('pusisteis', 'poner', ['v'], ['v']),
+ suffixInflection('pusieron', 'poner', ['v'], ['v']),
+ suffixInflection('dije', 'decir', ['v'], ['v']),
+ suffixInflection('dijiste', 'decir', ['v'], ['v']),
+ suffixInflection('dijo', 'decir', ['v'], ['v']),
+ suffixInflection('dijimos', 'decir', ['v'], ['v']),
+ suffixInflection('dijisteis', 'decir', ['v'], ['v']),
+ suffixInflection('dijeron', 'decir', ['v'], ['v']),
+ suffixInflection('vine', 'venir', ['v'], ['v']),
+ suffixInflection('viniste', 'venir', ['v'], ['v']),
+ suffixInflection('vino', 'venir', ['v'], ['v']),
+ suffixInflection('vinimos', 'venir', ['v'], ['v']),
+ suffixInflection('vinisteis', 'venir', ['v'], ['v']),
+ suffixInflection('vinieron', 'venir', ['v'], ['v']),
+ wholeWordInflection('quise', 'querer', ['v'], ['v']),
+ wholeWordInflection('quisiste', 'querer', ['v'], ['v']),
+ wholeWordInflection('quiso', 'querer', ['v'], ['v']),
+ wholeWordInflection('quisimos', 'querer', ['v'], ['v']),
+ wholeWordInflection('quisisteis', 'querer', ['v'], ['v']),
+ wholeWordInflection('quisieron', 'querer', ['v'], ['v']),
+ suffixInflection('tuve', 'tener', ['v'], ['v']),
+ suffixInflection('tuviste', 'tener', ['v'], ['v']),
+ suffixInflection('tuvo', 'tener', ['v'], ['v']),
+ suffixInflection('tuvimos', 'tener', ['v'], ['v']),
+ suffixInflection('tuvisteis', 'tener', ['v'], ['v']),
+ suffixInflection('tuvieron', 'tener', ['v'], ['v']),
+ wholeWordInflection('pude', 'poder', ['v'], ['v']),
+ wholeWordInflection('pudiste', 'poder', ['v'], ['v']),
+ wholeWordInflection('pudo', 'poder', ['v'], ['v']),
+ wholeWordInflection('pudimos', 'poder', ['v'], ['v']),
+ wholeWordInflection('pudisteis', 'poder', ['v'], ['v']),
+ wholeWordInflection('pudieron', 'poder', ['v'], ['v']),
+ wholeWordInflection('supe', 'saber', ['v'], ['v']),
+ wholeWordInflection('supiste', 'saber', ['v'], ['v']),
+ wholeWordInflection('supo', 'saber', ['v'], ['v']),
+ wholeWordInflection('supimos', 'saber', ['v'], ['v']),
+ wholeWordInflection('supisteis', 'saber', ['v'], ['v']),
+ wholeWordInflection('supieron', 'saber', ['v'], ['v']),
+ wholeWordInflection('estuve', 'estar', ['v'], ['v']),
+ wholeWordInflection('estuviste', 'estar', ['v'], ['v']),
+ wholeWordInflection('estuvo', 'estar', ['v'], ['v']),
+ wholeWordInflection('estuvimos', 'estar', ['v'], ['v']),
+ wholeWordInflection('estuvisteis', 'estar', ['v'], ['v']),
+ wholeWordInflection('estuvieron', 'estar', ['v'], ['v']),
+ wholeWordInflection('anduve', 'andar', ['v'], ['v']),
+ wholeWordInflection('anduviste', 'andar', ['v'], ['v']),
+ wholeWordInflection('anduvo', 'andar', ['v'], ['v']),
+ wholeWordInflection('anduvimos', 'andar', ['v'], ['v']),
+ wholeWordInflection('anduvisteis', 'andar', ['v'], ['v']),
+ wholeWordInflection('anduvieron', 'andar', ['v'], ['v']),
+ ],
+ },
+ 'imperfect': {
+ name: 'imperfect',
+ description: 'Imperfect form of a verb',
+ rules: [
+ // -ar verbs
+ suffixInflection('aba', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('abas', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('aba', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('ábamos', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('abais', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('aban', 'ar', ['v_ar'], ['v_ar']),
+ // -er verbs
+ suffixInflection('ía', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ías', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ía', 'er', ['v_er'], ['v_er']),
+ suffixInflection('íamos', 'er', ['v_er'], ['v_er']),
+ suffixInflection('íais', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ían', 'er', ['v_er'], ['v_er']),
+ // -ir verbs
+ suffixInflection('ía', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ías', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ía', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('íamos', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('íais', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ían', 'ir', ['v_ir'], ['v_ir']),
+ // -ir verbs with stem changes
+ suffixInflection('eía', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('eías', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('eía', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('eíamos', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('eíais', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('eían', 'ir', ['v_ir'], ['v_ir']),
+ // irregular verbs ir, ser, ver
+ wholeWordInflection('era', 'ser', ['v'], ['v']),
+ wholeWordInflection('eras', 'ser', ['v'], ['v']),
+ wholeWordInflection('era', 'ser', ['v'], ['v']),
+ wholeWordInflection('éramos', 'ser', ['v'], ['v']),
+ wholeWordInflection('erais', 'ser', ['v'], ['v']),
+ wholeWordInflection('eran', 'ser', ['v'], ['v']),
+ wholeWordInflection('iba', 'ir', ['v'], ['v']),
+ wholeWordInflection('ibas', 'ir', ['v'], ['v']),
+ wholeWordInflection('iba', 'ir', ['v'], ['v']),
+ wholeWordInflection('íbamos', 'ir', ['v'], ['v']),
+ wholeWordInflection('ibais', 'ir', ['v'], ['v']),
+ wholeWordInflection('iban', 'ir', ['v'], ['v']),
+ wholeWordInflection('veía', 'ver', ['v'], ['v']),
+ wholeWordInflection('veías', 'ver', ['v'], ['v']),
+ wholeWordInflection('veía', 'ver', ['v'], ['v']),
+ wholeWordInflection('veíamos', 'ver', ['v'], ['v']),
+ wholeWordInflection('veíais', 'ver', ['v'], ['v']),
+ wholeWordInflection('veían', 'ver', ['v'], ['v']),
+ ],
+ },
+ 'progressive': {
+ name: 'progressive',
+ description: 'Progressive form of a verb',
+ rules: [
+ suffixInflection('ando', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('iendo', 'er', ['v_er'], ['v_er']),
+ suffixInflection('iendo', 'ir', ['v_ir'], ['v_ir']),
+ ],
+ },
+ 'imperative': {
+ name: 'imperative',
+ description: 'Imperative form of a verb',
+ rules: [
+ // -ar verbs
+ suffixInflection('a', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('ad', 'ar', ['v_ar'], ['v_ar']),
+ // -er verbs
+ suffixInflection('e', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ed', 'er', ['v_er'], ['v_er']),
+ // -ir verbs
+ suffixInflection('e', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('id', 'ir', ['v_ir'], ['v_ir']),
+ // irregular verbs
+ wholeWordInflection('diga', 'decir', ['v'], ['v']),
+ // irregular imperative verbs
+ wholeWordInflection('sé', 'ser', ['v'], ['v']),
+ wholeWordInflection('ve', 'ir', ['v'], ['v']),
+ wholeWordInflection('ten', 'tener', ['v'], ['v']),
+ wholeWordInflection('ven', 'vener', ['v'], ['v']),
+ wholeWordInflection('haz', 'hacer', ['v'], ['v']),
+ wholeWordInflection('di', 'decir', ['v'], ['v']),
+ wholeWordInflection('pon', 'poner', ['v'], ['v']),
+ wholeWordInflection('sal', 'salir', ['v'], ['v']),
+ // TODO: negative commands, nosotros & vosotros commands
+ ],
+ },
+ 'conditional': {
+ name: 'conditional',
+ description: 'Conditional form of a verb',
+ rules: [
+ suffixInflection('ía', '', ['v'], ['v']),
+ suffixInflection('ías', '', ['v'], ['v']),
+ suffixInflection('ía', '', ['v'], ['v']),
+ suffixInflection('íamos', '', ['v'], ['v']),
+ suffixInflection('íais', '', ['v'], ['v']),
+ suffixInflection('ían', '', ['v'], ['v']),
+ // irregular verbs
+ wholeWordInflection('diría', 'decir', ['v'], ['v']),
+ wholeWordInflection('dirías', 'decir', ['v'], ['v']),
+ wholeWordInflection('diría', 'decir', ['v'], ['v']),
+ wholeWordInflection('diríamos', 'decir', ['v'], ['v']),
+ wholeWordInflection('diríais', 'decir', ['v'], ['v']),
+ wholeWordInflection('dirían', 'decir', ['v'], ['v']),
+ wholeWordInflection('haría', 'hacer', ['v'], ['v']),
+ wholeWordInflection('harías', 'hacer', ['v'], ['v']),
+ wholeWordInflection('haría', 'hacer', ['v'], ['v']),
+ wholeWordInflection('haríamos', 'hacer', ['v'], ['v']),
+ wholeWordInflection('haríais', 'hacer', ['v'], ['v']),
+ wholeWordInflection('harían', 'hacer', ['v'], ['v']),
+ wholeWordInflection('pondría', 'poner', ['v'], ['v']),
+ wholeWordInflection('pondrías', 'poner', ['v'], ['v']),
+ wholeWordInflection('pondría', 'poner', ['v'], ['v']),
+ wholeWordInflection('pondríamos', 'poner', ['v'], ['v']),
+ wholeWordInflection('pondríais', 'poner', ['v'], ['v']),
+ wholeWordInflection('pondrían', 'poner', ['v'], ['v']),
+ wholeWordInflection('saldría', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldrías', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldría', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldríamos', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldríais', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldrían', 'salir', ['v'], ['v']),
+ wholeWordInflection('tendría', 'tener', ['v'], ['v']),
+ wholeWordInflection('tendrías', 'tener', ['v'], ['v']),
+ wholeWordInflection('tendría', 'tener', ['v'], ['v']),
+ wholeWordInflection('tendríamos', 'tener', ['v'], ['v']),
+ wholeWordInflection('tendríais', 'tener', ['v'], ['v']),
+ wholeWordInflection('tendrían', 'tener', ['v'], ['v']),
+ wholeWordInflection('vendría', 'venir', ['v'], ['v']),
+ wholeWordInflection('vendrías', 'venir', ['v'], ['v']),
+ wholeWordInflection('vendría', 'venir', ['v'], ['v']),
+ wholeWordInflection('vendríamos', 'venir', ['v'], ['v']),
+ wholeWordInflection('vendríais', 'venir', ['v'], ['v']),
+ wholeWordInflection('vendrían', 'venir', ['v'], ['v']),
+ wholeWordInflection('querría', 'querer', ['v'], ['v']),
+ wholeWordInflection('querrías', 'querer', ['v'], ['v']),
+ wholeWordInflection('querría', 'querer', ['v'], ['v']),
+ wholeWordInflection('querríamos', 'querer', ['v'], ['v']),
+ wholeWordInflection('querríais', 'querer', ['v'], ['v']),
+ wholeWordInflection('querrían', 'querer', ['v'], ['v']),
+ wholeWordInflection('podría', 'poder', ['v'], ['v']),
+ wholeWordInflection('podrías', 'poder', ['v'], ['v']),
+ wholeWordInflection('podría', 'poder', ['v'], ['v']),
+ wholeWordInflection('podríamos', 'poder', ['v'], ['v']),
+ wholeWordInflection('podríais', 'poder', ['v'], ['v']),
+ wholeWordInflection('podrían', 'poder', ['v'], ['v']),
+ wholeWordInflection('sabría', 'saber', ['v'], ['v']),
+ wholeWordInflection('sabrías', 'saber', ['v'], ['v']),
+ wholeWordInflection('sabría', 'saber', ['v'], ['v']),
+ wholeWordInflection('sabríamos', 'saber', ['v'], ['v']),
+ wholeWordInflection('sabríais', 'saber', ['v'], ['v']),
+ wholeWordInflection('sabrían', 'saber', ['v'], ['v']),
+ ],
+ },
+ 'future': {
+ name: 'future',
+ description: 'Future form of a verb',
+ rules: [
+ suffixInflection('é', '', ['v'], ['v']),
+ suffixInflection('ás', '', ['v'], ['v']),
+ suffixInflection('á', '', ['v'], ['v']),
+ suffixInflection('emos', '', ['v'], ['v']),
+ suffixInflection('éis', '', ['v'], ['v']),
+ suffixInflection('án', '', ['v'], ['v']),
+ // irregular verbs
+ suffixInflection('diré', 'decir', ['v'], ['v']),
+ suffixInflection('dirás', 'decir', ['v'], ['v']),
+ suffixInflection('dirá', 'decir', ['v'], ['v']),
+ suffixInflection('diremos', 'decir', ['v'], ['v']),
+ suffixInflection('diréis', 'decir', ['v'], ['v']),
+ suffixInflection('dirán', 'decir', ['v'], ['v']),
+ wholeWordInflection('haré', 'hacer', ['v'], ['v']),
+ wholeWordInflection('harás', 'hacer', ['v'], ['v']),
+ wholeWordInflection('hará', 'hacer', ['v'], ['v']),
+ wholeWordInflection('haremos', 'hacer', ['v'], ['v']),
+ wholeWordInflection('haréis', 'hacer', ['v'], ['v']),
+ wholeWordInflection('harán', 'hacer', ['v'], ['v']),
+ suffixInflection('pondré', 'poner', ['v'], ['v']),
+ suffixInflection('pondrás', 'poner', ['v'], ['v']),
+ suffixInflection('pondrá', 'poner', ['v'], ['v']),
+ suffixInflection('pondremos', 'poner', ['v'], ['v']),
+ suffixInflection('pondréis', 'poner', ['v'], ['v']),
+ suffixInflection('pondrán', 'poner', ['v'], ['v']),
+ wholeWordInflection('saldré', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldrás', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldrá', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldremos', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldréis', 'salir', ['v'], ['v']),
+ wholeWordInflection('saldrán', 'salir', ['v'], ['v']),
+ suffixInflection('tendré', 'tener', ['v'], ['v']),
+ suffixInflection('tendrás', 'tener', ['v'], ['v']),
+ suffixInflection('tendrá', 'tener', ['v'], ['v']),
+ suffixInflection('tendremos', 'tener', ['v'], ['v']),
+ suffixInflection('tendréis', 'tener', ['v'], ['v']),
+ suffixInflection('tendrán', 'tener', ['v'], ['v']),
+ suffixInflection('vendré', 'venir', ['v'], ['v']),
+ suffixInflection('vendrás', 'venir', ['v'], ['v']),
+ suffixInflection('vendrá', 'venir', ['v'], ['v']),
+ suffixInflection('vendremos', 'venir', ['v'], ['v']),
+ suffixInflection('vendréis', 'venir', ['v'], ['v']),
+ suffixInflection('vendrán', 'venir', ['v'], ['v']),
+ ],
+ },
+ 'present subjunctive': {
+ name: 'present subjunctive',
+ description: 'Present subjunctive form of a verb',
+ rules: [
+ // -ar verbs
+ suffixInflection('e', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('es', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('e', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('emos', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('éis', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('en', 'ar', ['v_ar'], ['v_ar']),
+ // -er verbs
+ suffixInflection('a', 'er', ['v_er'], ['v_er']),
+ suffixInflection('as', 'er', ['v_er'], ['v_er']),
+ suffixInflection('a', 'er', ['v_er'], ['v_er']),
+ suffixInflection('amos', 'er', ['v_er'], ['v_er']),
+ suffixInflection('áis', 'er', ['v_er'], ['v_er']),
+ suffixInflection('an', 'er', ['v_er'], ['v_er']),
+ // -ir verbs
+ suffixInflection('a', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('as', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('a', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('amos', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('áis', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('an', 'ir', ['v_ir'], ['v_ir']),
+ // TODO: stem-changing verbs
+ // irregular verbs
+ wholeWordInflection('dé', 'dar', ['v'], ['v']),
+ wholeWordInflection('des', 'dar', ['v'], ['v']),
+ wholeWordInflection('dé', 'dar', ['v'], ['v']),
+ wholeWordInflection('demos', 'dar', ['v'], ['v']),
+ wholeWordInflection('deis', 'dar', ['v'], ['v']),
+ wholeWordInflection('den', 'dar', ['v'], ['v']),
+ wholeWordInflection('esté', 'estar', ['v'], ['v']),
+ wholeWordInflection('estés', 'estar', ['v'], ['v']),
+ wholeWordInflection('esté', 'estar', ['v'], ['v']),
+ wholeWordInflection('estemos', 'estar', ['v'], ['v']),
+ wholeWordInflection('estéis', 'estar', ['v'], ['v']),
+ wholeWordInflection('estén', 'estar', ['v'], ['v']),
+ wholeWordInflection('sea', 'ser', ['v'], ['v']),
+ wholeWordInflection('seas', 'ser', ['v'], ['v']),
+ wholeWordInflection('sea', 'ser', ['v'], ['v']),
+ wholeWordInflection('seamos', 'ser', ['v'], ['v']),
+ wholeWordInflection('seáis', 'ser', ['v'], ['v']),
+ wholeWordInflection('sean', 'ser', ['v'], ['v']),
+ wholeWordInflection('vaya', 'ir', ['v'], ['v']),
+ wholeWordInflection('vayas', 'ir', ['v'], ['v']),
+ wholeWordInflection('vaya', 'ir', ['v'], ['v']),
+ wholeWordInflection('vayamos', 'ir', ['v'], ['v']),
+ wholeWordInflection('vayáis', 'ir', ['v'], ['v']),
+ wholeWordInflection('vayan', 'ir', ['v'], ['v']),
+ wholeWordInflection('haya', 'haber', ['v'], ['v']),
+ wholeWordInflection('hayas', 'haber', ['v'], ['v']),
+ wholeWordInflection('haya', 'haber', ['v'], ['v']),
+ wholeWordInflection('hayamos', 'haber', ['v'], ['v']),
+ wholeWordInflection('hayáis', 'haber', ['v'], ['v']),
+ wholeWordInflection('hayan', 'haber', ['v'], ['v']),
+ wholeWordInflection('sepa', 'saber', ['v'], ['v']),
+ wholeWordInflection('sepas', 'saber', ['v'], ['v']),
+ wholeWordInflection('sepa', 'saber', ['v'], ['v']),
+ wholeWordInflection('sepamos', 'saber', ['v'], ['v']),
+ wholeWordInflection('sepáis', 'saber', ['v'], ['v']),
+ wholeWordInflection('sepan', 'saber', ['v'], ['v']),
+ ],
+ },
+ 'imperfect subjunctive': {
+ name: 'imperfect subjunctive',
+ description: 'Imperfect subjunctive form of a verb',
+ rules: [
+ // -ar verbs
+ suffixInflection('ara', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('aras', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('ara', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('áramos', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('arais', 'ar', ['v_ar'], ['v_ar']),
+ suffixInflection('aran', 'ar', ['v_ar'], ['v_ar']),
+ // -er verbs
+ suffixInflection('iera', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ieras', 'er', ['v_er'], ['v_er']),
+ suffixInflection('iera', 'er', ['v_er'], ['v_er']),
+ suffixInflection('iéramos', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ierais', 'er', ['v_er'], ['v_er']),
+ suffixInflection('ieran', 'er', ['v_er'], ['v_er']),
+ // -ir verbs
+ suffixInflection('iera', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ieras', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('iera', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('iéramos', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ierais', 'ir', ['v_ir'], ['v_ir']),
+ suffixInflection('ieran', 'ir', ['v_ir'], ['v_ir']),
+ // irregular verbs
+ wholeWordInflection('fuera', 'ser', ['v'], ['v']),
+ wholeWordInflection('fueras', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuera', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuéramos', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuerais', 'ser', ['v'], ['v']),
+ wholeWordInflection('fueran', 'ser', ['v'], ['v']),
+ wholeWordInflection('fuera', 'ir', ['v'], ['v']),
+ wholeWordInflection('fueras', 'ir', ['v'], ['v']),
+ wholeWordInflection('fuera', 'ir', ['v'], ['v']),
+ wholeWordInflection('fuéramos', 'ir', ['v'], ['v']),
+ wholeWordInflection('fuerais', 'ir', ['v'], ['v']),
+ wholeWordInflection('fueran', 'ir', ['v'], ['v']),
+ ],
+ },
},
};