From 46c8c815f28a020ed4c394b52f9ef7c0d952f594 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 11 Jun 2022 17:25:26 -0400 Subject: [PATCH] fix english sentence building for EP --- package.json | 2 +- src/lib/phrase-building/render-ep.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d691f2d..7143b28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "2.8.9", + "version": "2.9.0", "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/render-ep.ts b/src/lib/phrase-building/render-ep.ts index 0e9c1b1..c6b1b30 100644 --- a/src/lib/phrase-building/render-ep.ts +++ b/src/lib/phrase-building/render-ep.ts @@ -31,6 +31,7 @@ export function renderEP(EP: T.EPSelectionComplete): T.EPRendered { function getEPSBlocksAndKids(EP: T.EPSelectionComplete): { kids: T.Kid[], blocks: T.Block[], englishEquativePerson: T.Person } { const subject = getSubjectSelection(EP.blocks).selection; + const subjectPerson = getPersonFromNP(subject); const commandingNP: T.NPSelection = subject.selection.type === "pronoun" ? subject : EP.predicate.selection.type === "NP" @@ -57,7 +58,9 @@ function getEPSBlocksAndKids(EP: T.EPSelectionComplete): { kids: T.Kid[], blocks return { blocks, kids, - englishEquativePerson: commandingNP.selection.type === "participle" ? T.Person.ThirdSingMale : commandingPerson, + englishEquativePerson: subject.selection.type === "participle" + ? T.Person.ThirdSingMale + : subjectPerson, }; }