From d7c6a6044f2e633ba189c81e190da6335dd4ca2f Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:33:31 -0500 Subject: [PATCH] proper 8 categories of equatives --- package.json | 2 +- src/components/ep-explorer/EPExplorer.tsx | 2 +- src/components/ep-explorer/EquativePicker.tsx | 3 + src/components/vp-explorer/TensePicker.tsx | 4 + src/components/vp-explorer/VPExplorer.tsx | 2 +- src/lib/irregular-conjugations.ts | 82 ++++++++++++++++--- .../phrase-building/english-vp-rendering.ts | 6 ++ src/lib/phrase-building/render-ep.ts | 9 +- src/lib/phrase-building/vp-tools.ts | 7 +- src/lib/type-predicates.ts | 2 +- src/lib/verb-conjugation.ts | 33 +++++--- src/types.ts | 7 +- 12 files changed, 125 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 6a7f551..70a7637 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.1.1", + "version": "3.1.2", "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/components/ep-explorer/EPExplorer.tsx b/src/components/ep-explorer/EPExplorer.tsx index cb0386c..ffbaca7 100644 --- a/src/components/ep-explorer/EPExplorer.tsx +++ b/src/components/ep-explorer/EPExplorer.tsx @@ -38,7 +38,7 @@ function EPExplorer(props: { const [eps, adjustEps] = useStickyReducer( epsReducer, blankEps, - "EPState7", + "EPState8", flashMessage, ); const [alert, setAlert] = useState(undefined); diff --git a/src/components/ep-explorer/EquativePicker.tsx b/src/components/ep-explorer/EquativePicker.tsx index 365c3aa..7709480 100644 --- a/src/components/ep-explorer/EquativePicker.tsx +++ b/src/components/ep-explorer/EquativePicker.tsx @@ -28,6 +28,9 @@ const options: { label: string | JSX.Element, value: T.EquativeTense }[] = [{ }, { label: "Past Subjunctive", value: "pastSubjunctive", +}, { + label: `"Would Have Been"`, + value: "wouldHaveBeen", }]; function EquativePicker({ equative, onChange, hideNegative }: { diff --git a/src/components/vp-explorer/TensePicker.tsx b/src/components/vp-explorer/TensePicker.tsx index 940f81c..2520739 100644 --- a/src/components/vp-explorer/TensePicker.tsx +++ b/src/components/vp-explorer/TensePicker.tsx @@ -78,6 +78,10 @@ const perfectTenseOptions: { label: string | JSX.Element, value: T.PerfectTense, label: "Past Subjunctive Perfect", value: "pastSubjunctivePerfect", formula: "past participle + past subjunctive equative", +}, { + label: `"Would Have Been" Perfect`, + value: "wouldHaveBeenPerfect", + formula: `past participle + "would have been" equative`, }]; const imperativeTenseOptions: { label: string | JSX.Element, value: T.ImperativeTense, formula: string }[] = [{ diff --git a/src/components/vp-explorer/VPExplorer.tsx b/src/components/vp-explorer/VPExplorer.tsx index def522e..8cfb5a0 100644 --- a/src/components/vp-explorer/VPExplorer.tsx +++ b/src/components/vp-explorer/VPExplorer.tsx @@ -39,7 +39,7 @@ function VPExplorer(props: { props.loaded ? props.loaded : savedVps => makeVPSelectionState(props.verb, savedVps), - "vpsState15", + "vpsState16", flashMessage, ); const [mode, setMode] = useStickyState<"charts" | "phrases" | "quiz">( diff --git a/src/lib/irregular-conjugations.ts b/src/lib/irregular-conjugations.ts index eb5031e..ab29cf3 100644 --- a/src/lib/irregular-conjugations.ts +++ b/src/lib/irregular-conjugations.ts @@ -299,7 +299,7 @@ const kawulPerfectPassive: T.PerfectContent = { [[{p: "به کړی شوی وي", f: "ba kúRey shúwey wee"}], [{p: "به کړي شوي وي", f: "ba kúRee shúwee wee"}]], [[{p: "به کړې شوې وي", f: "ba kúRe shúwe wee"}], [{p: "به کړې شوې وي", f: "ba kúRe shúwe wee"}]], ], - affirmational: [ + wouldBe: [ [[{p: "به کړی شوی وم", f: "ba kúRey shúwey wum"}], [{p: "به کړي شوي وو", f: "ba kúRee shúwee woo"}]], [[{p: "به کړې شوې وم", f: "ba kúRe shúwe wum"}], [{p: "به کړې شوې وو", f: "ba kúRe shúwe woo"}]], [[{p: "به کړی شوی وې", f: "ba kúRey shúwey we"}], [{p: "به کړي شوي وئ", f: "ba kúRee shúwee weyy"}]], @@ -307,7 +307,15 @@ const kawulPerfectPassive: T.PerfectContent = { [[{p: "به کړی شوی و", f: "ba kúRey shúwey wo"}], [{p: "به کړي شوي وو", f: "ba kúRee shúwee woo"}]], [[{p: "به کړې شوې وه", f: "ba kúRe shúwe wa"}], [{p: "به کړې شوې وې", f: "ba kúRe shúwe we"}]], ], - pastSubjunctiveHypothetical: [ + pastSubjunctive: [ + [[{p: "کړی شوی وای", f: "kúRey shúwey waay"}, {p: "به کړی شوی وی", f: "kúRey shúwey wey"}], [{p: "کړي شوي وای", f: "ba kúRee shúwee waay"}, {p: "کړي شوي وی", f: "kúRee shúwee wey"}]], + [[{p: "کړې شوې وای", f: "kúRe shúwe waay"}, {p: "به کړې شوې وی", f: "kúRe shúwe wey"}], [{p: "کړې شوې وای", f: "ba kúRe shúwe waay"}, {p: "کړې شوې وی", f: "kúRe shúwe wey"}]], + [[{p: "کړی شوی وای", f: "kúRey shúwey waay"}, {p: "به کړی شوی وی", f: "kúRey shúwey wey"}], [{p: "کړي شوي وای", f: "ba kúRee shúwee waay"}, {p: "کړي شوي وی", f: "kúRee shúwee wey"}]], + [[{p: "کړې شوې وای", f: "kúRe shúwe waay"}, {p: "به کړې شوې وی", f: "kúRe shúwe wey"}], [{p: "کړې شوې وای", f: "ba kúRe shúwe waay"}, {p: "کړې شوې وی", f: "kúRe shúwe wey"}]], + [[{p: "کړی شوی وای", f: "kúRey shúwey waay"}, {p: "به کړی شوی وی", f: "kúRey shúwey wey"}], [{p: "کړي شوي وای", f: "ba kúRee shúwee waay"}, {p: "کړي شوي وی", f: "kúRee shúwee wey"}]], + [[{p: "کړې شوې وای", f: "kúRe shúwe waay"}, {p: "به کړې شوې وی", f: "kúRe shúwe wey"}], [{p: "کړې شوې وای", f: "ba kúRe shúwe waay"}, {p: "کړې شوې وی", f: "kúRe shúwe wey"}]], + ], + wouldHaveBeen: [ [[{p: "به کړی شوی وای", f: "ba kúRey shúwey waay"}, {p: "به کړی شوی وی", f: "ba kúRey shúwey wey"}], [{p: "به کړي شوي وای", f: "ba kúRee shúwee waay"}, {p: "به کړي شوي وی", f: "ba kúRee shúwee wey"}]], [[{p: "به کړې شوې وای", f: "ba kúRe shúwe waay"}, {p: "به کړې شوې وی", f: "ba kúRe shúwe wey"}], [{p: "به کړې شوې وای", f: "ba kúRe shúwe waay"}, {p: "به کړې شوې وی", f: "ba kúRe shúwe wey"}]], [[{p: "به کړی شوی وای", f: "ba kúRey shúwey waay"}, {p: "به کړی شوی وی", f: "ba kúRey shúwey wey"}], [{p: "به کړي شوي وای", f: "ba kúRee shúwee waay"}, {p: "به کړي شوي وی", f: "ba kúRee shúwee wey"}]], @@ -555,7 +563,7 @@ export const kedulStat: T.VerbConjugation = { [[{p: "به شوی وي", f: "ba shuwey wee"}], [{p: "به شوي وي", f: "ba shuwee wee"}]], [[{p: "به شوې وي", f: "ba shuwe wee"}], [{p: "به شوې وي", f: "ba shuwe wee"}]], ], - affirmational: [ + wouldBe: [ [[{p: "به شوی وم", f: "ba shuwey wum"}], [{p: "به شوي وو", f: "ba shuwee woo"}]], [[{p: "به شوې وم", f: "ba shuwe wum"}], [{p: "به شوې وو", f: "ba shuwe woo"}]], [[{p: "به شوی وې", f: "ba shuwey we"}], [{p: "به شوي وئ", f: "ba shuwee weyy"}]], @@ -563,7 +571,15 @@ export const kedulStat: T.VerbConjugation = { [[{p: "به شوی و", f: "ba shuwey wo"}], [{p: "به شوي وو", f: "ba shuwee woo"}]], [[{p: "به شوې وه", f: "ba shuwe wa"}], [{p: "به شوې وې", f: "ba shuwe we"}]], ], - pastSubjunctiveHypothetical: [ + pastSubjunctive: [ + [[{p: "شوی وای", f: "shuwey waay"}, {p: "شوی وی", f: "shuwey wey"}], [{p: "شوي وای", f: "shuwee waay"}, {p: "شوي وی", f: "shuwee wey"}]], + [[{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}], [{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}]], + [[{p: "شوی وای", f: "shuwey waay"}, {p: "شوی وی", f: "shuwey wey"}], [{p: "شوي وای", f: "shuwee waay"}, {p: "شوي وی", f: "shuwee wey"}]], + [[{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}], [{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}]], + [[{p: "شوی وای", f: "shuwey waay"}, {p: "شوی وی", f: "shuwey wey"}], [{p: "شوي وای", f: "shuwee waay"}, {p: "شوي وی", f: "shuwee wey"}]], + [[{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}], [{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}]], + ], + wouldHaveBeen: [ [[{p: "به شوی وای", f: "ba shuwey waay"}, {p: "به شوی وی", f: "ba shuwey wey"}], [{p: "به شوي وای", f: "ba shuwee waay"}, {p: "به شوي وی", f: "ba shuwee wey"}]], [[{p: "به شوې وای", f: "ba shuwe waay"}, {p: "به شوې وی", f: "ba shuwe wey"}], [{p: "به شوې وای", f: "ba shuwe waay"}, {p: "به شوې وی", f: "ba shuwe wey"}]], [[{p: "به شوی وای", f: "ba shuwey waay"}, {p: "به شوی وی", f: "ba shuwey wey"}], [{p: "به شوي وای", f: "ba shuwee waay"}, {p: "به شوي وی", f: "ba shuwee wey"}]], @@ -817,7 +833,7 @@ export const kedulDyn: T.VerbConjugation = { [[{p: "به شوی وي", f: "ba shuwey wee"}], [{p: "به شوي وي", f: "ba shuwee wee"}]], [[{p: "به شوې وي", f: "ba shuwe wee"}], [{p: "به شوې وي", f: "ba shuwe wee"}]], ], - affirmational: [ + wouldBe: [ [[{p: "به شوی وم", f: "ba shuwey wum"}], [{p: "به شوي وو", f: "ba shuwee woo"}]], [[{p: "به شوې وم", f: "ba shuwe wum"}], [{p: "به شوې وو", f: "ba shuwe woo"}]], [[{p: "به شوی وې", f: "ba shuwey we"}], [{p: "به شوي وئ", f: "ba shuwee weyy"}]], @@ -825,7 +841,15 @@ export const kedulDyn: T.VerbConjugation = { [[{p: "به شوی و", f: "ba shuwey wo"}], [{p: "به شوي وو", f: "ba shuwee woo"}]], [[{p: "به شوې وه", f: "ba shuwe wa"}], [{p: "به شوې وې", f: "ba shuwe we"}]], ], - pastSubjunctiveHypothetical: [ + pastSubjunctive: [ + [[{p: "شوی وای", f: "shuwey waay"}, {p: "شوی وی", f: "shuwey wey"}], [{p: "شوي وای", f: "shuwee waay"}, {p: "شوي وی", f: "shuwee wey"}]], + [[{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}], [{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}]], + [[{p: "شوی وای", f: "shuwey waay"}, {p: "شوی وی", f: "shuwey wey"}], [{p: "شوي وای", f: "shuwee waay"}, {p: "شوي وی", f: "shuwee wey"}]], + [[{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}], [{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}]], + [[{p: "شوی وای", f: "shuwey waay"}, {p: "شوی وی", f: "shuwey wey"}], [{p: "شوي وای", f: "shuwee waay"}, {p: "شوي وی", f: "shuwee wey"}]], + [[{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}], [{p: "شوې وای", f: "shuwe waay"}, {p: "شوې وی", f: "shuwe wey"}]], + ], + wouldHaveBeen: [ [[{p: "به شوی وای", f: "ba shuwey waay"}, {p: "به شوی وی", f: "ba shuwey wey"}], [{p: "به شوي وای", f: "ba shuwee waay"}, {p: "به شوي وی", f: "ba shuwee wey"}]], [[{p: "به شوې وای", f: "ba shuwe waay"}, {p: "به شوې وی", f: "ba shuwe wey"}], [{p: "به شوې وای", f: "ba shuwe waay"}, {p: "به شوې وی", f: "ba shuwe wey"}]], [[{p: "به شوی وای", f: "ba shuwey waay"}, {p: "به شوی وی", f: "ba shuwey wey"}], [{p: "به شوي وای", f: "ba shuwee waay"}, {p: "به شوي وی", f: "ba shuwee wey"}]], @@ -978,7 +1002,7 @@ const kawulPerfect: T.PerfectContent = { [[{p: "به کړی وي", f: "ba kúRey wee"}], [{p: "به کړي وي", f: "ba kúRee wee"}]], [[{p: "به کړې وي", f: "ba kúRe wee"}], [{p: "به کړې وي", f: "ba kúRe wee"}]], ], - affirmational: [ + wouldBe: [ [[{p: "به کړی وم", f: "ba kúRey wum"}], [{p: "به کړي وو", f: "ba kúRee woo"}]], [[{p: "به کړې وم", f: "ba kúRe wum"}], [{p: "به کړې وو", f: "ba kúRe woo"}]], [[{p: "به کړی وې", f: "ba kúRey we"}], [{p: "به کړي وئ", f: "ba kúRee weyy"}]], @@ -986,7 +1010,7 @@ const kawulPerfect: T.PerfectContent = { [[{p: "به کړی و", f: "ba kúRey wo"}], [{p: "به کړي وو", f: "ba kúRee woo"}]], [[{p: "به کړې وه", f: "ba kúRe wa"}], [{p: "به کړې وې", f: "ba kúRe we"}]], ], - pastSubjunctiveHypothetical: [ + pastSubjunctive: [ [[{p: "کړی وای", f: "kúRey waay"}, {p: "کړی وی", f: "kúRey wey"}], [{p: "کړی وای", f: "kúRey waay"}, {p: "کړی وی", f: "kúRey wey"}]], [[{p: "کړې وای", f: "kúRe waay"}, {p: "کړې وی", f: "kúRe wey"}], [{p: "کړې وای", f: "kúRe waay"}, {p: "کړې وی", f: "kúRe wey"}]], [[{p: "کړی وای", f: "kúRey waay"}, {p: "کړی وی", f: "kúRey wey"}], [{p: "کړی وای", f: "kúRey waay"}, {p: "کړی وی", f: "kúRey wey"}]], @@ -994,6 +1018,14 @@ const kawulPerfect: T.PerfectContent = { [[{p: "کړی وای", f: "kúRey waay"}, {p: "کړی وی", f: "kúRey wey"}], [{p: "کړی وای", f: "kúRey waay"}, {p: "کړی وی", f: "kúRey wey"}]], [[{p: "کړې وای", f: "kúRe waay"}, {p: "کړې وی", f: "kúRe wey"}], [{p: "کړې وای", f: "kúRe waay"}, {p: "کړې وی", f: "kúRe wey"}]], ], + wouldHaveBeen: [ + [[{p: "به کړی وای", f: "ba kúRey waay"}, {p: "به کړی وی", f: "ba kúRey wey"}], [{p: "به کړی وای", f: "ba kúRey waay"}, {p: "به کړی وی", f: "ba kúRey wey"}]], + [[{p: "به کړې وای", f: "ba kúRe waay"}, {p: "به کړې وی", f: "ba kúRe wey"}], [{p: "به کړې وای", f: "ba kúRe waay"}, {p: "به کړې وی", f: "ba kúRe wey"}]], + [[{p: "به کړی وای", f: "ba kúRey waay"}, {p: "به کړی وی", f: "ba kúRey wey"}], [{p: "به کړی وای", f: "ba kúRey waay"}, {p: "به کړی وی", f: "ba kúRey wey"}]], + [[{p: "به کړې وای", f: "ba kúRe waay"}, {p: "به کړې وی", f: "ba kúRe wey"}], [{p: "به کړې وای", f: "ba kúRe waay"}, {p: "به کړې وی", f: "ba kúRe wey"}]], + [[{p: "به کړی وای", f: "ba kúRey waay"}, {p: "به کړی وی", f: "ba kúRey wey"}], [{p: "به کړی وای", f: "ba kúRey waay"}, {p: "به کړی وی", f: "ba kúRey wey"}]], + [[{p: "به کړې وای", f: "ba kúRe waay"}, {p: "به کړې وی", f: "ba kúRe wey"}], [{p: "به کړې وای", f: "ba kúRe waay"}, {p: "به کړې وی", f: "ba kúRe wey"}]], + ], }; const kawulHypothetical: T.VerbForm = { @@ -2383,7 +2415,7 @@ export const tlul: T.VerbConjugation = { [[{p: "به تللې وي", f: "ba tlúle wee"}], [{p: "به تللې وي", f: "ba tlúle wee"}]], ], }, - affirmational: { + wouldBe: { short: [ [[{p: "به تلی وم", f: "ba túley wum"}], [{p: "به تلي وو", f: "ba túlee woo"}]], [[{p: "به تلې وم", f: "ba túle wum"}], [{p: "به تلې وو", f: "ba túle woo"}]], @@ -2401,7 +2433,25 @@ export const tlul: T.VerbConjugation = { [[{p: "به تللې وه", f: "ba tlúle wa"}], [{p: "به تللې وې", f: "ba tlúle we"}]], ], }, - pastSubjunctiveHypothetical: { + pastSubjunctive: { + short: [ + [[{p: "تلی وای", f: "túley waay"}, {p: "تلی وی", f: "túley wey"}], [{p: "تلي وای", f: "túlee waay"}, {p: "تلي وی", f: "túlee wey"}]], + [[{p: "تلې وای", f: "túle waay"}, {p: "تلې وی", f: "túle wey"}], [{p: "تلې وای", f: "túle waay"}, {p: "تلې وی", f: "túle wey"}]], + [[{p: "تلی وای", f: "túley waay"}, {p: "تلی وی", f: "túley wey"}], [{p: "تلي وای", f: "túlee waay"}, {p: "تلي وی", f: "túlee wey"}]], + [[{p: "تلې وای", f: "túle waay"}, {p: "تلې وی", f: "túle wey"}], [{p: "تلې وای", f: "túle waay"}, {p: "تلې وی", f: "túle wey"}]], + [[{p: "تلی وای", f: "túley waay"}, {p: "تلی وی", f: "túley wey"}], [{p: "تلي وای", f: "túlee waay"}, {p: "تلي وی", f: "túlee wey"}]], + [[{p: "تلې وای", f: "túle waay"}, {p: "تلې وی", f: "túle wey"}], [{p: "تلې وای", f: "túle waay"}, {p: "تلې وی", f: "túle wey"}]], + ], + long: [ + [[{p: "تللی وای", f: "tlúley waay"}, {p: "تللی وی", f: "tlúley wey"}], [{p: "تللي وای", f: "tlúlee waay"}, {p: "تللي وی", f: "tlúlee wey"}]], + [[{p: "تللې وای", f: "tlúle waay"}, {p: "تللې وی", f: "tlúle wey"}], [{p: "تللې وای", f: "tlúle waay"}, {p: "تللې وی", f: "tlúle wey"}]], + [[{p: "تللی وای", f: "tlúley waay"}, {p: "تللی وی", f: "tlúley wey"}], [{p: "تللي وای", f: "tlúlee waay"}, {p: "تللي وی", f: "tlúlee wey"}]], + [[{p: "تللې وای", f: "tlúle waay"}, {p: "تللې وی", f: "tlúle wey"}], [{p: "تللې وای", f: "tlúle waay"}, {p: "تللې وی", f: "tlúle wey"}]], + [[{p: "تللی وای", f: "tlúley waay"}, {p: "تللی وی", f: "tlúley wey"}], [{p: "تللي وای", f: "tlúlee waay"}, {p: "تللي وی", f: "tlúlee wey"}]], + [[{p: "تللې وای", f: "tlúle waay"}, {p: "تللې وی", f: "tlúle wey"}], [{p: "تللې وای", f: "tlúle waay"}, {p: "تللې وی", f: "tlúle wey"}]], + ], + }, + wouldHaveBeen: { short: [ [[{p: "به تلی وای", f: "ba túley waay"}, {p: "به تلی وی", f: "ba túley wey"}], [{p: "به تلي وای", f: "ba túlee waay"}, {p: "به تلي وی", f: "ba túlee wey"}]], [[{p: "به تلې وای", f: "ba túle waay"}, {p: "به تلې وی", f: "ba túle wey"}], [{p: "به تلې وای", f: "ba túle waay"}, {p: "به تلې وی", f: "ba túle wey"}]], @@ -2907,7 +2957,7 @@ export const warkawul: T.VerbConjugation = { [[{p: "به ورکړی وي", f: "ba wărkúRey wee"}], [{p: "به ورکړي وي", f: "ba wărkúRee wee"}]], [[{p: "به ورکړې وي", f: "ba wărkúRe wee"}], [{p: "به ورکړې وي", f: "ba wărkúRe wee"}]], ], - affirmational: [ + wouldBe: [ [[{p: "به ورکړی وم", f: "ba wărkúRey wum"}], [{p: "به ورکړي وو", f: "ba wărkúRee woo"}]], [[{p: "به ورکړې وم", f: "ba wărkúRe wum"}], [{p: "به ورکړې وو", f: "ba wărkúRe woo"}]], [[{p: "به ورکړی وې", f: "ba wărkúRey we"}], [{p: "به ورکړي وئ", f: "ba wărkúRee weyy"}]], @@ -2915,7 +2965,7 @@ export const warkawul: T.VerbConjugation = { [[{p: "به ورکړی و", f: "ba wărkúRey wo"}], [{p: "به ورکړي وو", f: "ba wărkúRee woo"}]], [[{p: "به ورکړې وه", f: "ba wărkúRe wa"}], [{p: "به ورکړې وې", f: "ba wărkúRe we"}]], ], - pastSubjunctiveHypothetical: [ + pastSubjunctive: [ [[{p: "ورکړی وای", f: "wărkúRey waay"}, {p: "ورکړی وی", f: "wărkúRey wey"}], [{p: "ورکړی وای", f: "wărkúRey waay"}, {p: "ورکړی وی", f: "wărkúRey wey"}]], [[{p: "ورکړې وای", f: "wărkúRe waay"}, {p: "ورکړې وی", f: "wărkúRe wey"}], [{p: "ورکړې وای", f: "wărkúRe waay"}, {p: "ورکړې وی", f: "wărkúRe wey"}]], [[{p: "ورکړی وای", f: "wărkúRey waay"}, {p: "ورکړی وی", f: "wărkúRey wey"}], [{p: "ورکړی وای", f: "wărkúRey waay"}, {p: "ورکړی وی", f: "wărkúRey wey"}]], @@ -2923,6 +2973,14 @@ export const warkawul: T.VerbConjugation = { [[{p: "ورکړی وای", f: "wărkúRey waay"}, {p: "ورکړی وی", f: "wărkúRey wey"}], [{p: "ورکړی وای", f: "wărkúRey waay"}, {p: "ورکړی وی", f: "wărkúRey wey"}]], [[{p: "ورکړې وای", f: "wărkúRe waay"}, {p: "ورکړې وی", f: "wărkúRe wey"}], [{p: "ورکړې وای", f: "wărkúRe waay"}, {p: "ورکړې وی", f: "wărkúRe wey"}]], ], + wouldHaveBeen: [ + [[{p: "به ورکړی وای", f: "ba wărkúRey waay"}, {p: "به ورکړی وی", f: "ba wărkúRey wey"}], [{p: "به ورکړی وای", f: "ba wărkúRey waay"}, {p: "به ورکړی وی", f: "ba wărkúRey wey"}]], + [[{p: "به ورکړې وای", f: "ba wărkúRe waay"}, {p: "به ورکړې وی", f: "ba wărkúRe wey"}], [{p: "به ورکړې وای", f: "ba wărkúRe waay"}, {p: "به ورکړې وی", f: "ba wărkúRe wey"}]], + [[{p: "به ورکړی وای", f: "ba wărkúRey waay"}, {p: "به ورکړی وی", f: "ba wărkúRey wey"}], [{p: "به ورکړی وای", f: "ba wărkúRey waay"}, {p: "به ورکړی وی", f: "ba wărkúRey wey"}]], + [[{p: "به ورکړې وای", f: "ba wărkúRe waay"}, {p: "به ورکړې وی", f: "ba wărkúRe wey"}], [{p: "به ورکړې وای", f: "ba wărkúRe waay"}, {p: "به ورکړې وی", f: "ba wărkúRe wey"}]], + [[{p: "به ورکړی وای", f: "ba wărkúRey waay"}, {p: "به ورکړی وی", f: "ba wărkúRey wey"}], [{p: "به ورکړی وای", f: "ba wărkúRey waay"}, {p: "به ورکړی وی", f: "ba wărkúRey wey"}]], + [[{p: "به ورکړې وای", f: "ba wărkúRe waay"}, {p: "به ورکړې وی", f: "ba wărkúRe wey"}], [{p: "به ورکړې وای", f: "ba wărkúRe waay"}, {p: "به ورکړې وی", f: "ba wărkúRe wey"}]], + ], }, // passive: { // imperfective: { diff --git a/src/lib/phrase-building/english-vp-rendering.ts b/src/lib/phrase-building/english-vp-rendering.ts index f80abe8..77801c3 100644 --- a/src/lib/phrase-building/english-vp-rendering.ts +++ b/src/lib/phrase-building/english-vp-rendering.ts @@ -143,6 +143,9 @@ export function renderEnglishVPBase({ subjectPerson, object, vs }: { `$SUBJ would${n ? " not" : ""} have ${v[4]}`, `$SUBJ should${n ? " not" : ""} have ${v[4]}`, ]), + wouldHaveBeenPerfect: (s: T.Person, v: T.EnglishVerbConjugationEc, n: boolean) => ([ + `$SUBJ would${n ? " not" : ""} have ${v[4]}`, + ]), } const passiveBasicBuilders: Record< T.VerbTense, @@ -201,6 +204,9 @@ export function renderEnglishVPBase({ subjectPerson, object, vs }: { pastSubjunctivePerfect: (s: T.Person, v: T.EnglishVerbConjugationEc, n: boolean) => ([ `$SUBJ would${n ? " not" : ""} have been ${v[4]}`, ]), + wouldHaveBeenPerfect: (s: T.Person, v: T.EnglishVerbConjugationEc, n: boolean) => ([ + `$SUBJ would${n ? " not" : ""} have been ${v[4]}`, + ]), } const passiveModalBuilders: Record< T.ModalTense, diff --git a/src/lib/phrase-building/render-ep.ts b/src/lib/phrase-building/render-ep.ts index dc44250..ac440fe 100644 --- a/src/lib/phrase-building/render-ep.ts +++ b/src/lib/phrase-building/render-ep.ts @@ -87,11 +87,13 @@ function removeOrKeepSubject(blocks: (T.EPSBlockComplete | T.SubjectSelectionCom } export function getEquativeForm(tense: T.EquativeTense): { hasBa: boolean, form: T.SingleOrLengthOpts } { - const hasBa = (tense === "future" || tense === "wouldBe"); + const hasBa = (tense === "future" || tense === "wouldBe" || tense === "wouldHaveBeen"); const baseTense = (tense === "future") ? "habitual" : tense === "wouldBe" ? "past" + : tense === "wouldHaveBeen" + ? "pastSubjunctive" : tense; return { hasBa, @@ -224,6 +226,11 @@ const equativeBuilders: Record str `(that) $SUBJ were $PRED`, ]; }, + wouldHaveBeen: () => { + return [ + `$SUBJ would have been $PRED`, + ]; + } } function isThirdPersonSing(p: T.Person): boolean { diff --git a/src/lib/phrase-building/vp-tools.ts b/src/lib/phrase-building/vp-tools.ts index c92b362..36525b8 100644 --- a/src/lib/phrase-building/vp-tools.ts +++ b/src/lib/phrase-building/vp-tools.ts @@ -110,10 +110,13 @@ export function getTenseVerbForm( return conj.perfect.subjunctive; } if (tense === "wouldBePerfect") { - return conj.perfect.affirmational; + return conj.perfect.wouldBe; } if (tense === "pastSubjunctivePerfect") { - return conj.perfect.pastSubjunctiveHypothetical; + return conj.perfect.pastSubjunctive; + } + if (tense === "wouldHaveBeenPerfect") { + return conj.perfect.wouldHaveBeen; } throw new Error("unknown tense"); } diff --git a/src/lib/type-predicates.ts b/src/lib/type-predicates.ts index 1942ec8..8b294ea 100644 --- a/src/lib/type-predicates.ts +++ b/src/lib/type-predicates.ts @@ -189,7 +189,7 @@ export function isModalTense(tense: T.Tense): tense is T.ModalTense { } export function isEquativeTense(t: T.Tense): t is T.EquativeTense { - return (t === "present" || t === "future" || t === "habitual" || t === "past" || t === "wouldBe" || t === "subjunctive" || t === "pastSubjunctive"); + return (t === "present" || t === "future" || t === "habitual" || t === "past" || t === "wouldBe" || t === "subjunctive" || t === "pastSubjunctive" || t === "wouldHaveBeen"); } export function isImperativeTense(tense: T.Tense): tense is T.ImperativeTense { diff --git a/src/lib/verb-conjugation.ts b/src/lib/verb-conjugation.ts index 7c4109c..c99cedc 100644 --- a/src/lib/verb-conjugation.ts +++ b/src/lib/verb-conjugation.ts @@ -169,8 +169,9 @@ function conjugateDynamicCompound(info: T.DynamicCompoundVerbInfo): T.VerbConjug habitual: addToForm([complement, " "], pset.habitual), subjunctive: addToForm([complement, " "], pset.subjunctive), future: addToForm([complement, " "], pset.future), - affirmational: addToForm([complement, " "], pset.affirmational), - pastSubjunctiveHypothetical: addToForm([complement, " "], pset.pastSubjunctiveHypothetical), + wouldBe: addToForm([complement, " "], pset.wouldBe), + pastSubjunctive: addToForm([complement, " "], pset.pastSubjunctive), + wouldHaveBeen: addToForm([complement, " "], pset.wouldHaveBeen), }); const makePassiveAspectContent = (aspect: T.Aspect, passive: T.PassiveContent): T.AspectContentPassive => { const nonImperative = addToForm([complement, " "], passive[aspect].nonImperative); @@ -412,8 +413,9 @@ function makePerfectContent(info: T.NonComboVerbInfo): T.PerfectContent { const habitual = addToForm([...pastPart, " "], equativeEndings.habitual); const subjunctive = addToForm([...pastPart, " "], equativeEndings.subjunctive); const future = addToForm([baParticle, " ", ...pastPart, " "], equativeEndings.habitual); - const affirmational = addToForm([baParticle, " ", ...pastPart, " "], equativeEndings.past.short); - const pastSubjunctiveHypothetical = addToForm([...pastPart, " "], equativeEndings.pastSubjunctive); + const wouldBe = addToForm([baParticle, " ", ...pastPart, " "], equativeEndings.past.short); + const pastSubjunctive = addToForm([...pastPart, " "], equativeEndings.pastSubjunctive); + const wouldHaveBeen = addToForm([baParticle, " ", ...pastPart, " "], equativeEndings.pastSubjunctive); return { halfPerfect, // Past Participle past, // Past Participle + Past Equative @@ -421,8 +423,9 @@ function makePerfectContent(info: T.NonComboVerbInfo): T.PerfectContent { habitual, // Past Participle + Habitual Equative subjunctive, // Past Participle + Subjunctive Equative future, // به - ba + Past Participle + Future/Subj Equative - affirmational, // به - ba + Past Participle + Past Equative - pastSubjunctiveHypothetical, // Past Participle + وای - waay + wouldBe, // به - ba + Past Participle + Past Equative + pastSubjunctive, // Past Participle + وای - waay + wouldHaveBeen, // Past Participle + ba + waay }; } @@ -531,14 +534,18 @@ function makePassivePerfectContent(info: T.StativeCompoundVerbInfo): T.PerfectCo [baParticle, " ", info.complement, " ", passiveStativeBridge, " ", pPart, " "], equativeEndings.habitual, ); - const affirmational = addToForm( + const wouldBe = addToForm( [baParticle, " ", info.complement, " ", passiveStativeBridge, " ", pPart, " "], equativeEndings.past.short, ); - const pastSubjunctiveHypothetical = addToForm( + const pastSubjunctive = addToForm( [info.complement, " ", passiveStativeBridge, " ", pPart, " "], equativeEndings.pastSubjunctive, ); + const wouldHaveBeen = addToForm( + [baParticle, " ", info.complement, " ", passiveStativeBridge, " ", pPart, " "], + equativeEndings.pastSubjunctive, + ); return { halfPerfect, past, @@ -546,8 +553,9 @@ function makePassivePerfectContent(info: T.StativeCompoundVerbInfo): T.PerfectCo habitual, subjunctive, future, - affirmational, - pastSubjunctiveHypothetical, + wouldBe, + pastSubjunctive, + wouldHaveBeen, }; } @@ -575,8 +583,9 @@ function enforceObject(conj: T.VerbConjugation, person: T.Person): T.VerbConjuga habitual: allOnePersonInflection(perf.habitual, person), subjunctive: allOnePersonInflection(perf.subjunctive, person), future: allOnePersonVerbForm(perf.future, person), - affirmational: allOnePersonVerbForm(perf.affirmational, person), - pastSubjunctiveHypothetical: allOnePersonVerbForm(perf.pastSubjunctiveHypothetical, person), + wouldBe: allOnePersonVerbForm(perf.wouldBe, person), + pastSubjunctive: allOnePersonVerbForm(perf.pastSubjunctive, person), + wouldHaveBeen: allOnePersonVerbForm(perf.wouldHaveBeen, person), }); const modifyPassiveAspect = (as: T.AspectContentPassive): T.AspectContentPassive => ({ imperative: undefined, diff --git a/src/types.ts b/src/types.ts index a1d4a40..401eceb 100644 --- a/src/types.ts +++ b/src/types.ts @@ -339,8 +339,9 @@ export type PerfectContent = { habitual: VerbForm; // PPART + equative.habit subjunctive: VerbForm; // PPART + equative.subj future: VerbForm; // ba + PPART + equative.subj - affirmational: VerbForm; // ba + PPART + equative.past - pastSubjunctiveHypothetical: VerbForm; // PPART + waay + wouldBe: VerbForm; // ba + PPART + equative.past + pastSubjunctive: VerbForm; // PPART + waay + wouldHaveBeen: VerbForm; // PPART + ba + waay } // Plain, 1st, and 2nd Inflection @@ -530,7 +531,7 @@ export type VerbTense = "presentVerb" | "habitualImperfectivePast"; export type NounNumber = "singular" | "plural"; -export type EquativeTense = "present" | "subjunctive" | "habitual" | "past" | "future" | "wouldBe" | "pastSubjunctive"; +export type EquativeTense = "present" | "subjunctive" | "habitual" | "past" | "future" | "wouldBe" | "pastSubjunctive" | "wouldHaveBeen"; export type PerfectTense = `${EquativeTense}Perfect`; export type ModalTense = `${VerbTense}Modal`; export type ImperativeTense = `${Aspect}Imperative`;