JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q93305F
  • License MIT

Spanish verb conjugator, castellano, voseo, canarias, formal

Package Exports

  • @jirimracek/conjugate-esp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jirimracek/conjugate-esp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Spanish verb conjugator

Matrix Build Coverage Status GitHub

This project uses templates, pattern matching & logic to conjugate Spanish verbs, there are no lookup tables, no databases, no dependencies. While the development depends on few external packages, the deployed npm has no dependencies

  • Project goals: correct, detailed, complete, independent, fast & small (yes, you can have it all)
  • 10567 tested verbs, uses 97 models
  • includes only current, RAE recognized as known & used verbs
    • regional varieties of castellano, voseo, formal, canarias
    • defectives
    • multiple (dual & triple) conjugations
    • dual participios
    • orthographical changes (1999 and 2010)

  • Version 2.1.1
  • Updated Thu 05 Nov 2020 07:38:28 PM CET
    • TL;DR
      • changes concerning pre and past 2010 orthography rules, added info header entry, added tests
      • minor cleanup before npm publish
    • see CHANGELOG for details
    • see ROADMAP for future changes and ideas
    • see USAGE for public interfaces and more info


Basic usage, see the repository USAGE.md file for details

Installation

  • clone / download gitHub repository
  • npm i @jirimracek/conjugate-esp

TypeScript use

    // Uncomment one of the following 2 lines based on install type
    // import { Conjugator } from  <path to install>                 // locally installed from repository
    // import { Conjugator } from  '@jirimracek/conjugate-esp';      // npm installed
    //
    const cng = new Conjugator();
    cng.setOrthography('2010');                                   // defaults to '2010'
    // cng.setOrthography('1999');                                // use 1999 orthography rules
    /*
    * main entry points (see below for more details, parameters, return types)
    * sync:  conjugateSync()
    * async: conjugate()
    */
    const table = cng.conjugateSync('adscribir', 'formal');       // sync, formal, returns Result[] | ErrorType
    console.log(JSON.stringify(table, null, 1));
    cng.conjugate('soler', 'voseo')                               // async, voseo, returns Promise<Result[] | ErrorType>
      .then(table => console.log(JSON.stringify(table, null, 1))) // process correct result
      .catch(error => console.error(error));                      // catch error

JavaScript use

    // Uncomment one of the following 2 lines based on install type
    // const CNG = require('<path to install>/dist');       // localy installed from repository
    // const CNG = require("@jirimracek/conjugate-esp");    // npm installed
    const cng = new CNG.Conjugator();
    // ... same code as TypeScript above

Returns array of tables or error, see USAGE

  • Impersonal
    • Infinitivo, Gerundio, Participio
  • Indicativo
    • Simple
      • Presente, Pretérito Imperfecto, Pretérito Indefinido, Futuro Imperfecto, Condicional Simple
    • Compuesto
      • Pretérito Perfecto, Pretérito Pluscuamperfecto, Pretérito Anterior, Futuro Perfecto, Condicional Compuesto
  • Subjuntivo
    • Simple
      • Presente, Pretérito Imperfecto Ra, Pretérito Imperfecto Se, Futuro Imperfecto
    • Compuesto
      • Pretérito Perfecto, Pretérito Pluscuamperfecto Ra, Pretérito Pluscuamperfecto Se, Futuro Perfecto
  • Imperativo
    • Afirmativo
    • Negativo

Implemented and tested conjugation models

AR
hablar
acertar
actuar
aguar
ahincar
aislar
andar
aunar
avergonzar
cabrahigar
colgar
contar
dar
desdar
desosar
engorar
enraizar
errar
estar
forzar
jugar
pagar
regar
rozar
sacar
tropezar
vaciar
volcar
ER
temer
caber
caer
coger
corroer
creer
haber
hacer
mover
nacer
oler
placer
poder
poner
querer
raer
rehacer
responder
rever
romper
saber
ser
tañer
tender
tener
torcer
traer
valer
vencer
ver
volver
yacer
IR
partir
abrir
adquirir
argüir
asir
balbucir
bendecir
ceñir
cohibir
conducir
corregir
decir
delinquir
dirigir
discernir
distinguir
dormir
embaír
erguir
escribir
huir
ir
lucir
oír
plañir
podrir
pudrir
rehenchir
rehuir
reunir
reír
salir
seguir
sentir
servir
venir
zurcir

Resources