mini-pronouns parsing

This commit is contained in:
adueck 2024-02-10 06:50:43 -05:00
parent ae4ff6f27b
commit b5e33b1db9
1 changed files with 2 additions and 8 deletions

View File

@ -30,7 +30,7 @@ import { equals, zip } from "rambda";
import { isImperativeTense } from "../type-predicates"; import { isImperativeTense } from "../type-predicates";
// to hide equatives type-doubling issue // to hide equatives type-doubling issue
// TODO: problem with 3rd pers seng verb endings اواز مې دې واورېده // TODO: problem with 3rd pers sing verb endings اواز مې دې واورېده
// TODO: word query for kawul/kedul/stat/dyn // TODO: word query for kawul/kedul/stat/dyn
@ -1165,13 +1165,7 @@ function createPossesivePossibilities(
return blocks.flatMap((b) => { return blocks.flatMap((b) => {
const miniPronouns = getMiniPronouns(b.body.kids); const miniPronouns = getMiniPronouns(b.body.kids);
if (miniPronouns.length === 0) { if (miniPronouns.length === 0) {
return [ return b;
{
tokens: b.tokens,
body: b.body,
errors: b.errors,
},
];
} else if (miniPronouns.length === 1) { } else if (miniPronouns.length === 1) {
const withFirstMiniAsPossesive = spreadOutPoss(b.body, 0); const withFirstMiniAsPossesive = spreadOutPoss(b.body, 0);
return [b.body, ...withFirstMiniAsPossesive].map((x) => ({ return [b.body, ...withFirstMiniAsPossesive].map((x) => ({