Bug fix on the ordering of short perfect forms

on the shortest forms of the perfect forms, the insertable particles
should get inserted between the past participle and equative, eg. لیدلی به دې وم
This commit is contained in:
Bill D 2021-03-18 09:40:08 +04:00
parent 12c551c1e3
commit 3c6f3aaec5
3 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "0.3.0",
"version": "0.3.1",
"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",

View File

@ -399,29 +399,30 @@ function makeOnlyMiniForm(
return [reorderedNegativeAfterSplitHead(splitHead)];
}
// only mini without split
const [beginning, end] = splitOffLeapfrogWord(ps);
if (!displayForm.reorderWithNegative || !negative) {
if (objComplement) {
return [
concatPsString(
objComplement,
" ",
psStringContains(ps, concatPsString(baParticle, " ")) ? concatPsString(" ", baParticle, " ") : " ",
concatPsString(mini, " "),
negative ? concatPsString(" ", nuParticle, " ") : "",
removeObjComp(objComplement, ps),
removeObjComp(objComplement, psRemove(ps, concatPsString(baParticle, " "))),
)
];
}
return [
concatPsString(
psRemove(ps, concatPsString(baParticle, " ")),
psRemove(beginning, concatPsString(baParticle, " ")),
" ",
psStringContains(ps, concatPsString(baParticle, " ")) ? concatPsString(baParticle, " ") : "",
psStringContains(beginning, concatPsString(baParticle, " ")) ? concatPsString(baParticle, " ") : "",
mini,
negative ? concatPsString(" ", nuParticle) : "",
)
negative ? concatPsString(" ", nuParticle) : " ",
end,
),
];
}
const [beginning, end] = splitOffLeapfrogWord(ps);
if (objComplement) {
return [
ensureBaAt(

View File

@ -80,7 +80,6 @@ export function getVerbInfo(
const transitivity = getTransitivity(entry);
if (type !== "simple") {
if (!complement) {
console.log(entry);
throw new Error("complement required for compound verb");
}
if (type === "dynamic compound") {