fix bug with the negative imperative and staying imperfective

This commit is contained in:
lingdocs 2022-04-20 22:38:28 +05:00
parent 611f5defe5
commit c6f9626039
3 changed files with 5 additions and 3 deletions

View File

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

@ -162,7 +162,9 @@ function getPsVerbConjugation(conj: T.VerbConjugation, vs: T.VerbSelectionComple
// TODO: handle the imperative form here
const f = getTenseVerbForm(conj, vs.tense, vs.voice, vs.negative);
const block = getMatrixBlock(f, objectPerson, person);
const perfective = isPerfective(vs.tense);
const perfective = (vs.tense === "perfectiveImperative" && vs.negative)
? false
: isPerfective(vs.tense);
const verbForm = getVerbFromBlock(block, person);
const hasBa = hasBaParticle(getLong(verbForm)[0]);
if (perfective) {

View File

@ -543,7 +543,7 @@ export type VPSelectionComplete = {
verb: VerbSelectionComplete,
};
export type VerbSelectionComplete = Omit<VerbSelection, "object" | "verbTense" | "perfectTense" | "tenseCategory"> & {
export type VerbSelectionComplete = Omit<VerbSelection, "object" | "verbTense" | "perfectTense" | "imperfectiveTense" | "tenseCategory"> & {
object: Exclude<VerbObject, undefined>,
tense: VerbTense | PerfectTense | ModalTense | ImperativeTense,
}