bugs with the new complement/accent functionality - proper verbInfo
This commit is contained in:
parent
6355bf9f1a
commit
ffdd244f6f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/pashto-inflector",
|
||||
"version": "3.4.9",
|
||||
"version": "3.5.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",
|
||||
|
|
|
@ -459,12 +459,7 @@ function createComplementRetroactively(complement: T.DictionaryEntry | undefined
|
|||
if (!complement) {
|
||||
throw new Error("error creating complement from head - no complement in verb entry");
|
||||
}
|
||||
if (isNounEntry(complement)) {
|
||||
return {
|
||||
type: "complement",
|
||||
selection: makeNounSelection(complement, undefined, undefined),
|
||||
};
|
||||
}
|
||||
// very important to have this before isNounEntry! (ie لېونی - n. m. anim unisex / adj. needs to be recognized as an adjective first!)
|
||||
if (isAdjectiveEntry(complement)) {
|
||||
if (person === undefined) {
|
||||
throw new Error("there needs to be a complement person for rendering an adjective complement");
|
||||
|
@ -478,6 +473,12 @@ function createComplementRetroactively(complement: T.DictionaryEntry | undefined
|
|||
},
|
||||
};
|
||||
}
|
||||
if (isNounEntry(complement)) {
|
||||
return {
|
||||
type: "complement",
|
||||
selection: makeNounSelection(complement, undefined, undefined),
|
||||
};
|
||||
}
|
||||
if (isLocativeAdverbEntry(complement)) {
|
||||
return {
|
||||
type: "complement",
|
||||
|
|
|
@ -499,7 +499,7 @@ function getVerbRoots(entry: T.DictionaryEntryNoFVars, transitivity: T.Transitiv
|
|||
const comp = complementInflects(complement) ? unisexInfToObjectMatrix(complement) : complement.masc[0][0];
|
||||
const t = getAuxTransitivity(transitivity);
|
||||
const aux = stativeAux[t].info.root.imperfective
|
||||
return concatPsString(comp, " ", aux) as T.OptionalPersonInflections<T.LengthOptions<T.PsString>>;
|
||||
return concatPsString(removeAccentsFull(comp), " ", aux) as T.OptionalPersonInflections<T.LengthOptions<T.PsString>>;
|
||||
}
|
||||
return shortAndLong(entry);
|
||||
})();
|
||||
|
@ -546,7 +546,19 @@ function getVerbRoots(entry: T.DictionaryEntryNoFVars, transitivity: T.Transitiv
|
|||
perfective,
|
||||
perfectiveSplit,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function removeAccentsFull(p: T.OptionalPersonInflections<T.PsString>): T.OptionalPersonInflections<T.PsString> {
|
||||
if ("mascPlur" in p) {
|
||||
return {
|
||||
"mascSing": removeAccents(p.mascSing),
|
||||
"mascPlur": removeAccents(p.mascPlur),
|
||||
"femSing": removeAccents(p.femSing),
|
||||
"femPlur": removeAccents(p.femPlur),
|
||||
}
|
||||
};
|
||||
return removeAccents(p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the stems (imperfective and perfective) of a given verb
|
||||
|
@ -588,7 +600,7 @@ function getVerbStems(entry: T.DictionaryEntryNoFVars, root: T.VerbRootSet, tran
|
|||
if (complement && spaceInForm(root.imperfective)) {
|
||||
const comp = complementInflects(complement) ? unisexInfToObjectMatrix(complement) : complement.masc[0][0];
|
||||
return concatPsString(
|
||||
comp,
|
||||
removeAccentsFull(comp),
|
||||
" ",
|
||||
stativeAux[auxTransitivity].info.stem.imperfective as T.PsString,
|
||||
);
|
||||
|
@ -734,7 +746,7 @@ function getParticiple(entry: T.DictionaryEntryNoFVars, stem: T.VerbStemSet, inf
|
|||
const comp = compInflects ? unisexInfToObjectMatrix(complement) : complement.masc[0][0];
|
||||
const aux = stativeAux[auxTransitivity].info.participle[tense] as T.PsString;
|
||||
return concatPsString(
|
||||
comp,
|
||||
removeAccentsFull(comp),
|
||||
" ",
|
||||
compInflects
|
||||
? unisexInfToObjectMatrix(inflectYey(aux) as T.UnisexInflections)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
module.exports = [
|
||||
1658537932357, // لېونی کېدل
|
||||
1588760879818, // احساسېدل - to feel, be sensed
|
||||
1577223176187, // ادا کېدل - to be set forth, given, rendered (service), performed, fulfilled, expressed, said, done
|
||||
1527814793, // اړېدل - to need, to be forced, to have to, to experience a need
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
module.exports = [
|
||||
1658537998960, // لېونی کول
|
||||
1527812403, // بچ کول - to save, protect, guard, spare, rescue, economize
|
||||
1577299232429, // بدلول - to change, to adapt, exchange, replace
|
||||
1527815728, // بلدول - to familiarize with, to acquaint, orient, to train
|
||||
|
|
Loading…
Reference in New Issue