fix english sentence building for EP
This commit is contained in:
parent
f06e3d8341
commit
46c8c815f2
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue