From c3904171a1258241e6479e454f5c64b74f94fb38 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 26 Mar 2022 08:56:50 +0500 Subject: [PATCH] also O S V order with present tense --- src/lib/phrase-building/compile-vp.ts | 10 ++++++---- src/lib/phrase-building/render-vp.ts | 4 +++- src/types/gen-g.d.ts | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/lib/phrase-building/compile-vp.ts b/src/lib/phrase-building/compile-vp.ts index 3df1c9f..89d321a 100644 --- a/src/lib/phrase-building/compile-vp.ts +++ b/src/lib/phrase-building/compile-vp.ts @@ -7,7 +7,7 @@ import { } from "@lingdocs/pashto-inflector"; import { removeBa } from "./vp-tools"; -// TODO: make it an option to include O S V order ?? or is that just always in past tense +// TODO: make it an option to include O S V order ? // TODO: tu ba laaR nu she hyphens all messed up export function compileVP(VP: VPRendered, form: FormVersion): { ps: T.SingleOrLengthOpts, e?: string [] }; export function compileVP(VP: VPRendered, form: FormVersion, combineLengths: true): { ps: T.PsString[], e?: string [] }; @@ -93,10 +93,9 @@ function getSegmentsAndKids(VP: VPRendered, form: FormVersion): { kids: Segment[ ...showSubject ? [makeSegment(main.subject)] : [], ...(showObject && main.object) ? [makeSegment(main.object)] : [], ], - // TODO: make this an option to also include O S V order + // TODO: make this an option to also include O S V order ?? // also show O S V if both are showing - // TODO: is in only in the past that you can do O S V? - ...(VP.isPast && main.object && showObject && showSubject) ? [[ + ...(main.object && showObject && showSubject) ? [[ makeSegment(main.object), makeSegment(main.subject), ]] : [], @@ -199,6 +198,9 @@ function compileEnglish(VP: VPRendered): string[] | undefined { : undefined; } +// SEGMENT TOOLS +// TODO: PULL OUT FOR SHARING ACROSS COMPILE EP ETC? + type SegmentDescriptions = { isVerbHead?: boolean, isOoOrWaaHead?: boolean, diff --git a/src/lib/phrase-building/render-vp.ts b/src/lib/phrase-building/render-vp.ts index 0b92f6f..cc18d1e 100644 --- a/src/lib/phrase-building/render-vp.ts +++ b/src/lib/phrase-building/render-vp.ts @@ -124,10 +124,12 @@ function renderParticipleSelection(p: ParticipleSelection, inflected: boolean): function renderVerbSelection(vs: VerbSelection, person: T.Person, objectPerson: T.Person | undefined): VerbRendered { const conjugations = conjugateVerb(vs.verb.entry, vs.verb.complement); // TODO: error handle this? - // TODO: option to manually select these const conj = "grammaticallyTransitive" in conjugations + // if there's an option for grammatically transitive or transitive + // will default to transitive ? conjugations.transitive : "stative" in conjugations + // TODO: option to manually select stative/dynamic ? conjugations.stative : conjugations; return { diff --git a/src/types/gen-g.d.ts b/src/types/gen-g.d.ts index c8d0ac3..8848bdd 100644 --- a/src/types/gen-g.d.ts +++ b/src/types/gen-g.d.ts @@ -31,10 +31,11 @@ type VerbSelection = { type: "verb", verb: VerbEntry, tense: VerbTense, - object: VerbObject, + object: VerbObject, // TODO: should have a locked in (but number changeable noun) here for dynamic compounds transitivity: "transitive" | "intransitive" | "grammaticallyTransitive", changeTransitivity?: (t: "transitive" | "grammaticallyTransitive") => VerbSelection, - // TODO: add in perfective element here?? + // TODO: changeStativeDynamic + // TODO: add in aspect element here?? negative: boolean, };