A python library to conjugate spanish words with parameters tense, mood and pronoun
Low maintenance activity. Last release 24 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install spanishconjugatorSpanish Conjugator 🇪🇸
A class Conjugator containing a function conjugate which conjugates spanish verbs by tense, mood and pronoun.
Installation
pip install spanishconjugator
Example usage
Example python usage; the conjugate function of the Conjugator Class takes 4 parameters being root-verb, tense, mood, pronoun respectively
from spanishconjugator import Conjugator
imperfect_conjugation = Conjugator().conjugate('hablar','imperfect','indicative','yo')
print(imperfect_conjugation)
>>> hablaba
Tenses, Moods and Pronouns implemented
All pronouns are implemented
yo, tu, usted, nosotros, vosotros, ustedes
All moods currently implemented are
indicative, conditional
All tenses currently implemented are
present, imperfect, preterite, future, present_perfect, past_anterior, future_perfect, conditional_simple
Exaple usage of different moods/tenses with hablar and yo
Indicative Present
Conjugator().conjugate('hablar','present','indicative','yo')
>>> hablo
In case of indicative present, 4th param pronoun is optional.
from spanishconjugator import Conjugator
present_indicative_conjugation = Conjugator().conjugate('hablar','present','indicative')
print(present_indicative_conjugation)
>>> {'el/ella/usted': 'habla', 'ellos/ellas/ustedes': 'hablan', 'tu': 'hablas', 'vosotros': 'habláis', 'yo': 'hablo', 'nosotros': 'hablamos'}
Indicative Imperfect
Conjugator().conjugate('hablar','imperfect','indicative','yo')
>>> hablaba
Indicative Preterite
Conjugator().conjugate('hablar','preterite','indicative','yo')
>>> hablé
