This commit is contained in:
adueck 2023-04-07 21:36:19 +04:00
parent ce2fa640c0
commit 91d3a10abb
3 changed files with 15 additions and 16 deletions

View File

@ -38,6 +38,8 @@ import { verbEndingConcat } from "./rs-helpers";
// TODO: are azmóyulum and wáayulo really not just azmoyúlum and waayúlo ?
// TODO: automatic 3rd person idiosyncronizing of raTul raaTu, shaRul, shaaRu, rasedul rased etc
// IMMEDIATE TODO: shwoo -> shoo
export function renderVerb({ verb, tense, person, voice }: {
verb: T.VerbEntry,
tense: T.VerbTense | T.PerfectTense | T.AbilityTense, // TODO: make T.Tense
@ -56,7 +58,7 @@ export function renderVerb({ verb, tense, person, voice }: {
const isPast = isPastTense(tense);
const aspect = getAspect(tense);
const isAbility = isAbilityTense(tense);
const type = isAbilityTense(tense) ? "ability" : "basic";
const genderNumber = {
gender: personGender(person),
number: personNumber(person),
@ -68,11 +70,8 @@ export function renderVerb({ verb, tense, person, voice }: {
rs: isPast ? "root" : "stem",
aspect,
},
type: voice === "passive"
? "passive"
: isAbility
? "ability"
: "basic",
voice,
type,
genderNumber,
});
// #2 add the verb ending to it

View File

@ -29,16 +29,16 @@ const shVB: T.VBBasic = {
ps: [{ p: "ش", f: "sh" }],
}
// start basic inflection functions for pattern 1 and pattern ey things
// to be used by inflecting لاړ and participles
// put the past participle in a different function
export function getRootStem({ verb, part, type, genderNumber }: {
export function getRootStem({ verb, part, type, genderNumber, voice }: {
verb: T.VerbEntry,
part: {
rs: "root" | "stem",
aspect: T.Aspect,
} | "pastPart",
type: "basic" | "ability" | "passive",
voice: "active" | "passive",
type: "basic" | "ability",
genderNumber: {
gender: T.Gender,
number: T.NounNumber,
@ -51,7 +51,7 @@ export function getRootStem({ verb, part, type, genderNumber }: {
if (type === "ability") {
return getAbilityRs(v, part);
}
if (type === "passive") {
if (voice === "passive") {
return getPassiveRs(v, part);
}
return part.rs === "stem"
@ -83,7 +83,7 @@ function getPassiveRs(verb: T.VerbEntryNoFVars, part: { aspect: T.Aspect, rs: "r
: getPerfectiveRoot
)(verb);
const longRoot = getLongVB(basicRoot);
const kedulVba = getRootStem({ verb: kedulStat, part, type: "basic", genderNumber: { gender: "masc", number: "singular" }})[1][0] as T.VBBasic;
const kedulVba = getRootStem({ verb: kedulStat, part, type: "basic", voice: "active", genderNumber: { gender: "masc", number: "singular" }})[1][0] as T.VBBasic;
return [
vHead,
[weld(longRoot, kedulVba)],

View File

@ -26,12 +26,12 @@ export function getAllRs(verb: T.VerbEntry): {
} {
return {
stem: {
perfective: getRootStem({ verb, type: "basic", part: { rs: "stem", aspect: "perfective" }, genderNumber: { gender: "masc", number: "singular" } }),
imperfective: getRootStem({ verb, type: "basic", part: { rs: "stem", aspect: "imperfective" }, genderNumber: { gender: "masc", number: "singular" } }),
perfective: getRootStem({ verb, type: "basic", voice: "active", part: { rs: "stem", aspect: "perfective" }, genderNumber: { gender: "masc", number: "singular" } }),
imperfective: getRootStem({ verb, type: "basic", voice: "active", part: { rs: "stem", aspect: "imperfective" }, genderNumber: { gender: "masc", number: "singular" } }),
},
root: {
perfective: getRootStem({ verb, type: "basic", part: { rs: "root", aspect: "perfective" }, genderNumber: { gender: "masc", number: "singular" } }),
imperfective: getRootStem({ verb, type: "basic", part: { rs: "root", aspect: "imperfective" }, genderNumber: { gender: "masc", number: "singular" } }),
perfective: getRootStem({ verb, type: "basic", voice: "active", part: { rs: "root", aspect: "perfective" }, genderNumber: { gender: "masc", number: "singular" } }),
imperfective: getRootStem({ verb, type: "basic", voice: "active", part: { rs: "root", aspect: "imperfective" }, genderNumber: { gender: "masc", number: "singular" } }),
},
};
}