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
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
- Many thanks to Estudio Sampere Salamanca, España
- Esther González, Ester García, María Ballesteros you're my heroes
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 errorJavaScript 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 aboveReturns 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
- Simple
- 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
- Simple
- Imperativo
- Afirmativo
- Negativo
Implemented and tested conjugation models
|
|
|
Resources
Estudio Sampere Salamanca - great place to study Spanish
RAE main page and their (paid subscription, much recommended) RAE Enclave
Rodríguez-Rodríguez, G; Carreras-Riudavets, F; Hernández-Figueroa, Z; (2009). Conjugación de verbos en español - Conjugador TIP - excellent book, about the most accurate and complete web conjugator I found
Vadémecum del verbo español, Pedro Gomis Blanco, Laura Segura Calvo - good technical reference on verb usage, but has many errors (tables, verb to model index), use with extreme caution
... and many others