From 86f99f58ad192348291aebebb9ebacc2b87b591d Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 19 Jul 2022 16:24:58 -0500 Subject: [PATCH] better pastSubjunctive english --- package.json | 2 +- src/lib/phrase-building/english-vp-rendering.ts | 5 ++++- src/lib/phrase-building/render-ep.ts | 15 ++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index cc169a3..0f5ea4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.4.2", + "version": "3.4.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/phrase-building/english-vp-rendering.ts b/src/lib/phrase-building/english-vp-rendering.ts index 860b639..6089ebc 100644 --- a/src/lib/phrase-building/english-vp-rendering.ts +++ b/src/lib/phrase-building/english-vp-rendering.ts @@ -141,10 +141,13 @@ export function renderEnglishVPBase({ subjectPerson, object, vs }: { ]), wouldBePerfect: (s: T.Person, v: T.EnglishVerbConjugationEc, n: boolean) => ([ `$SUBJ would${n ? " not" : ""} have ${v[4]}`, + `$SUBJ had probably ${n ? " not" : ""} ${v[4]}`, ]), pastSubjunctivePerfect: (s: T.Person, v: T.EnglishVerbConjugationEc, n: boolean) => ([ - `$SUBJ would${n ? " not" : ""} have ${v[4]}`, `$SUBJ should${n ? " not" : ""} have ${v[4]}`, + `$SUBJ ${n ? "didn't have" : "had"} to ${v[0]}`, + `$SUBJ had${n ? " not" : ""} to have ${v[4]}`, + `$SUBJ would${n ? " not" : ""} have ${v[4]}`, ]), wouldHaveBeenPerfect: (s: T.Person, v: T.EnglishVerbConjugationEc, n: boolean) => ([ `$SUBJ would${n ? " not" : ""} have ${v[4]}`, diff --git a/src/lib/phrase-building/render-ep.ts b/src/lib/phrase-building/render-ep.ts index 5c592ea..099a8dd 100644 --- a/src/lib/phrase-building/render-ep.ts +++ b/src/lib/phrase-building/render-ep.ts @@ -188,18 +188,19 @@ const equativeBuilders: Record str `$SUBJ ${getEnglishConj(p, g.englishEquative.past)} probably${not(n)} $PRED`, ]; }, - pastSubjunctive: () => { + pastSubjunctive: (p, n) => { return [ - `$SUBJ should have been $PRED`, - `(that) $SUBJ were $PRED`, + `$SUBJ should ${n ? "not " : ""}have been $PRED`, + `$SUBJ had to ${n ? "not " : ""}be $PRED`, + `(that) $SUBJ were ${n ? "not " : ""}$PRED`, ]; }, - wouldHaveBeen: () => { + wouldHaveBeen: (p, n) => { return [ - `$SUBJ would have been $PRED`, + `$SUBJ would ${n ? "not " : ""}have been $PRED`, ]; - } -} + }, +}; function isThirdPersonSing(p: T.Person): boolean { return p === T.Person.ThirdSingMale || p === T.Person.ThirdPlurFemale;