From 3cf19acbf731551f87ef93084a26b12e6c5984d6 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 30 Aug 2022 18:13:52 +0400 Subject: [PATCH] OOPS big error inflecting subject nouns --- package.json | 2 +- src/lib/phrase-building/render-np.ts | 2 +- src/lib/phrase-building/render-vp.ts | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f3af2fb..028be8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.8.5", + "version": "3.8.6", "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-np.ts b/src/lib/phrase-building/render-np.ts index 2571db5..cb181d6 100644 --- a/src/lib/phrase-building/render-np.ts +++ b/src/lib/phrase-building/render-np.ts @@ -48,7 +48,7 @@ export function renderNPSelection(NP: T.NPSelection, inflected: boolean, inflect export function renderNounSelection(n: T.NounSelection, inflected: boolean, role: "servant" | "king" | "none", noArticles?: true | "noArticles", isPuSandwich?: boolean): T.Rendered { const english = getEnglishFromNoun(n.entry, n.number, noArticles); - const nounInflects = !(isPuSandwich && isPattern1Entry(n.entry) && n.number === "singular") + const nounInflects = inflected && !(isPuSandwich && isPattern1Entry(n.entry) && n.number === "singular"); const pashto = ((): T.PsString[] => { const infs = inflectWord(n.entry); const ps = n.number === "singular" diff --git a/src/lib/phrase-building/render-vp.ts b/src/lib/phrase-building/render-vp.ts index 55a2750..a9c7347 100644 --- a/src/lib/phrase-building/render-vp.ts +++ b/src/lib/phrase-building/render-vp.ts @@ -53,7 +53,6 @@ export function renderVP(VP: T.VPSelectionComplete): T.VPRendered { } const subjectPerson = getPersonFromNP(subject); const objectPerson = getPersonFromNP(object); - // TODO: also don't inflect if it's a pattern one animate noun const inflectSubject = isPast && isTransitive && !isMascSingAnimatePattern4(subject); const inflectObject = !isPast && isFirstOrSecondPersPronoun(object); // Render Elements