From 3964ae70f2908ec453516e12895b850c57bf0df2 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:21:30 +0500 Subject: [PATCH] add habitual past to passive --- 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 95946ce..340b20b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "1.6.1", + "version": "1.6.3", "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 2adc98c..560e665 100644 --- a/src/lib/verb-conjugation.ts +++ b/src/lib/verb-conjugation.ts @@ -178,10 +178,12 @@ function conjugateDynamicCompound(info: T.DynamicCompoundVerbInfo): T.VerbConjug const nonImperative = addToForm([complement, " "], passive[aspect].nonImperative); const future = addToForm([baParticle, " "], nonImperative); const past = addToForm([complement, " "], passive[aspect].past); + const habitualPast = addToForm([baParticle, " "], past); return { nonImperative, future, past, + habitualPast, }; } return { @@ -447,10 +449,12 @@ function makePassiveContent(info: T.NonComboVerbInfo): { [info.complement, " ", bridge, " "], stativeAux.intransitive[aspect].past, ); + const habitualPast = addToForm([baParticle, " "], past); return { nonImperative, future, past, + habitualPast, }; } const root = noPersInfs(info.root[aspect]).long; @@ -458,10 +462,12 @@ function makePassiveContent(info: T.NonComboVerbInfo): { const nonImperative = addToForm([root, " "], aux.nonImperative); const future = addToForm([baParticle, " "], nonImperative); const past = addToForm([root, " "], aux.past); + const habitualPast = addToForm([baParticle, " "], past); return { nonImperative, // ROOT LONG + kedulStat[aspect].nonImperative future, // به ba + ROOT LONG + this.nonImperative past, // ROOT LONG + kedulStat[aspect].past + habitualPast, }; } const simpleVerbParticiple = { @@ -562,6 +568,7 @@ function enforceObject(conj: T.VerbConjugation, person: T.Person): T.VerbConjuga nonImperative: allOnePersonVerbForm(as.nonImperative, person), future: allOnePersonVerbForm(as.future, person), past: allOnePersonVerbForm(as.past, person), + habitualPast: allOnePersonInflection(as.past, person), }); return { ...conj, diff --git a/src/types.ts b/src/types.ts index 2093448..515548d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -316,6 +316,7 @@ export type AspectContentPassive = { nonImperative: VerbForm; // ROOT LONG + kedulStat[ASPECT].nonImperative future: VerbForm; // ba + this.nonImperative past: VerbForm; // ROOT LONG + kedulStat[ASPECT].past + habitualPast: VerbForm; } export type ParticipleForm = SingleOrLengthOpts | SingleOrLengthOpts;