also O S V order with present tense

This commit is contained in:
lingdocs 2022-03-26 08:56:50 +05:00
parent cf91b178ab
commit c3904171a1
3 changed files with 12 additions and 7 deletions

View File

@ -7,7 +7,7 @@ import {
} from "@lingdocs/pashto-inflector"; } from "@lingdocs/pashto-inflector";
import { removeBa } from "./vp-tools"; 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 // TODO: tu ba laaR nu she hyphens all messed up
export function compileVP(VP: VPRendered, form: FormVersion): { ps: T.SingleOrLengthOpts<T.PsString[]>, e?: string [] }; export function compileVP(VP: VPRendered, form: FormVersion): { ps: T.SingleOrLengthOpts<T.PsString[]>, e?: string [] };
export function compileVP(VP: VPRendered, form: FormVersion, combineLengths: true): { ps: T.PsString[], 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)] : [], ...showSubject ? [makeSegment(main.subject)] : [],
...(showObject && main.object) ? [makeSegment(main.object)] : [], ...(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 // also show O S V if both are showing
// TODO: is in only in the past that you can do O S V? ...(main.object && showObject && showSubject) ? [[
...(VP.isPast && main.object && showObject && showSubject) ? [[
makeSegment(main.object), makeSegment(main.object),
makeSegment(main.subject), makeSegment(main.subject),
]] : [], ]] : [],
@ -199,6 +198,9 @@ function compileEnglish(VP: VPRendered): string[] | undefined {
: undefined; : undefined;
} }
// SEGMENT TOOLS
// TODO: PULL OUT FOR SHARING ACROSS COMPILE EP ETC?
type SegmentDescriptions = { type SegmentDescriptions = {
isVerbHead?: boolean, isVerbHead?: boolean,
isOoOrWaaHead?: boolean, isOoOrWaaHead?: boolean,

View File

@ -124,10 +124,12 @@ function renderParticipleSelection(p: ParticipleSelection, inflected: boolean):
function renderVerbSelection(vs: VerbSelection, person: T.Person, objectPerson: T.Person | undefined): VerbRendered { function renderVerbSelection(vs: VerbSelection, person: T.Person, objectPerson: T.Person | undefined): VerbRendered {
const conjugations = conjugateVerb(vs.verb.entry, vs.verb.complement); const conjugations = conjugateVerb(vs.verb.entry, vs.verb.complement);
// TODO: error handle this? // TODO: error handle this?
// TODO: option to manually select these
const conj = "grammaticallyTransitive" in conjugations const conj = "grammaticallyTransitive" in conjugations
// if there's an option for grammatically transitive or transitive
// will default to transitive
? conjugations.transitive ? conjugations.transitive
: "stative" in conjugations : "stative" in conjugations
// TODO: option to manually select stative/dynamic
? conjugations.stative ? conjugations.stative
: conjugations; : conjugations;
return { return {

View File

@ -31,10 +31,11 @@ type VerbSelection = {
type: "verb", type: "verb",
verb: VerbEntry, verb: VerbEntry,
tense: VerbTense, tense: VerbTense,
object: VerbObject, object: VerbObject, // TODO: should have a locked in (but number changeable noun) here for dynamic compounds
transitivity: "transitive" | "intransitive" | "grammaticallyTransitive", transitivity: "transitive" | "intransitive" | "grammaticallyTransitive",
changeTransitivity?: (t: "transitive" | "grammaticallyTransitive") => VerbSelection, changeTransitivity?: (t: "transitive" | "grammaticallyTransitive") => VerbSelection,
// TODO: add in perfective element here?? // TODO: changeStativeDynamic
// TODO: add in aspect element here??
negative: boolean, negative: boolean,
}; };