added habitualPast to conjugations

This commit is contained in:
lingdocs 2022-03-29 14:28:02 +05:00
parent b3d5a70e83
commit 895aacedd2
3 changed files with 9 additions and 1 deletions

View File

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

@ -136,6 +136,7 @@ function conjugateDynamicCompound(info: T.DynamicCompoundVerbInfo): T.VerbConjug
? addToForm([complement, " "], ac.imperative)
: null;
const past = addToForm([complement, " "], auxConj[aspect].past);
const habitualPast = addToForm([baParticle, " "], past);
const modal = makeDynamicModalContent();
return {
nonImperative,
@ -144,6 +145,7 @@ function conjugateDynamicCompound(info: T.DynamicCompoundVerbInfo): T.VerbConjug
imperative,
} : {},
past,
habitualPast,
modal,
};
}
@ -215,11 +217,13 @@ function makeAspectContent(info: T.NonComboVerbInfo, aspect: T.Aspect): T.Aspect
const roughPast = addToForm([root], pastEndings) as T.LengthOptions<T.VerbBlock>;
// add accents and idiosyncratic third person sing masc forms
const past = finishSimpleVerbPast(info, aspect, roughPast);
const habitualPast = addToForm([baParticle, " "], past);
return {
nonImperative, // stem + present endings
future, // به - ba + nonImperative
imperative, // stem + imperative endings
past, // root + past endings
habitualPast, // ba + past
modal: makeJoinedModalContent(info, aspect),
};
}
@ -305,10 +309,12 @@ function makeStativeCompoundSeperatedAspectContent(info: T.StativeCompoundVerbIn
? addToForm([presentComplement, " "], aux.imperative)
: null;
const past = addToForm([info.complement, " "], aux.past);
const habitualPast = addToForm([baParticle, " "], past);
return {
nonImperative,
future,
past,
habitualPast,
...imperative ? {
imperative,
} : {},
@ -525,6 +531,7 @@ function enforceObject(conj: T.VerbConjugation, person: T.Person): T.VerbConjuga
imperative: allOnePersonInflection(as.imperative, person),
} : {},
past: allOnePersonVerbForm(as.past, person),
habitualPast: allOnePersonInflection(as.habitualPast, person),
modal: {
...as.modal,
past: allOnePersonVerbForm(as.modal.past, person),

View File

@ -298,6 +298,7 @@ export type AspectContent = {
imperative?: ImperativeForm; // STEM + imperative ending
// -- optional because not used for intransitive verison of kawul dynamic compounds
past: VerbForm; // ROOT + past ending
habitualPast: VerbForm; // ba + past
modal: ModalContent;
}