From 895aacedd2b2381d1aeaa28d9d9e82c8b5ccc2df Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 29 Mar 2022 14:28:02 +0500 Subject: [PATCH] added habitualPast to conjugations --- package.json | 2 +- src/lib/verb-conjugation.ts | 7 +++++++ src/types.ts | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b707ca..6634161 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "1.5.7", + "version": "1.5.8", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/lib/verb-conjugation.ts b/src/lib/verb-conjugation.ts index eb1d2f5..bd7085a 100644 --- a/src/lib/verb-conjugation.ts +++ b/src/lib/verb-conjugation.ts @@ -136,6 +136,7 @@ function conjugateDynamicCompound(info: T.DynamicCompoundVerbInfo): T.VerbConjug ? addToForm([complement, " "], ac.imperative) : null; const past = addToForm([complement, " "], auxConj[aspect].past); + const habitualPast = addToForm([baParticle, " "], past); const modal = makeDynamicModalContent(); return { nonImperative, @@ -144,6 +145,7 @@ function conjugateDynamicCompound(info: T.DynamicCompoundVerbInfo): T.VerbConjug imperative, } : {}, past, + habitualPast, modal, }; } @@ -215,11 +217,13 @@ function makeAspectContent(info: T.NonComboVerbInfo, aspect: T.Aspect): T.Aspect const roughPast = addToForm([root], pastEndings) as T.LengthOptions; // add accents and idiosyncratic third person sing masc forms const past = finishSimpleVerbPast(info, aspect, roughPast); + const habitualPast = addToForm([baParticle, " "], past); return { nonImperative, // stem + present endings future, // به - ba + nonImperative imperative, // stem + imperative endings past, // root + past endings + habitualPast, // ba + past modal: makeJoinedModalContent(info, aspect), }; } @@ -305,10 +309,12 @@ function makeStativeCompoundSeperatedAspectContent(info: T.StativeCompoundVerbIn ? addToForm([presentComplement, " "], aux.imperative) : null; const past = addToForm([info.complement, " "], aux.past); + const habitualPast = addToForm([baParticle, " "], past); return { nonImperative, future, past, + habitualPast, ...imperative ? { imperative, } : {}, @@ -525,6 +531,7 @@ function enforceObject(conj: T.VerbConjugation, person: T.Person): T.VerbConjuga imperative: allOnePersonInflection(as.imperative, person), } : {}, past: allOnePersonVerbForm(as.past, person), + habitualPast: allOnePersonInflection(as.habitualPast, person), modal: { ...as.modal, past: allOnePersonVerbForm(as.modal.past, person), diff --git a/src/types.ts b/src/types.ts index e6ae41c..dac9d7f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -298,6 +298,7 @@ export type AspectContent = { imperative?: ImperativeForm; // STEM + imperative ending // -- optional because not used for intransitive verison of kawul dynamic compounds past: VerbForm; // ROOT + past ending + habitualPast: VerbForm; // ba + past modal: ModalContent; }