now working with giving verbs

This commit is contained in:
adueck 2023-07-23 10:17:18 +04:00
parent 5edf0d1e02
commit 021af159c5
5 changed files with 299 additions and 124 deletions

View File

@ -342,3 +342,7 @@ export function chooseLength<N>(
} }
return x; return x;
} }
export function isGivingVerb(v: T.VerbEntry): boolean {
return ["raakawul", "darkawul", "warkawul"].includes(v.entry.g);
}

View File

@ -534,6 +534,39 @@ const khufaKedul = vEntry(
c: "adj.", c: "adj.",
} }
); );
const warkawul = vEntry({
ts: 1527813914,
i: 14899,
p: "ورکول",
f: "warkawul",
g: "warkawul",
e: "to give (to him/her/it - towards third person)",
r: 4,
c: "v. trans.",
ec: "give,gives,giving,gave,given",
});
const raakawul = vEntry({
ts: 1527813914,
i: 14899,
p: "راکول",
f: "raakawul",
g: "raakawul",
e: "to give (to him/her/it - towards first person)",
r: 4,
c: "v. trans.",
ec: "give,gives,giving,gave,given",
});
const darkawul = vEntry({
ts: 1527813914,
i: 14899,
p: "درکول",
f: "darkawul",
g: "darkawul",
e: "to give (to him/her/it - towards second person)",
r: 4,
c: "v. trans.",
ec: "give,gives,giving,gave,given",
});
const ooPH: T.PH = { type: "PH", ps: { p: "و", f: "óo" } }; const ooPH: T.PH = { type: "PH", ps: { p: "و", f: "óo" } };
@ -946,6 +979,56 @@ describe("perfective stems", () => {
}, },
], ],
}, },
{
title: "special giving verbs",
tests: [
{
verb: warkawul,
result: [
[{ type: "PH", ps: { p: "ور", f: "wár" } }],
[
{
type: "VB",
ps: {
long: [{ p: "کړ", f: "kR" }],
short: [{ p: "ک", f: "k" }],
},
},
],
],
},
{
verb: darkawul,
result: [
[{ type: "PH", ps: { p: "در", f: "dár" } }],
[
{
type: "VB",
ps: {
long: [{ p: "کړ", f: "kR" }],
short: [{ p: "ک", f: "k" }],
},
},
],
],
},
{
verb: raakawul,
result: [
[{ type: "PH", ps: { p: "را", f: "ráa" } }],
[
{
type: "VB",
ps: {
long: [{ p: "کړ", f: "kR" }],
short: [{ p: "ک", f: "k" }],
},
},
],
],
},
],
},
{ {
title: "includes extra irregular short roots for kawul verbs", title: "includes extra irregular short roots for kawul verbs",
tests: [ tests: [
@ -1299,6 +1382,59 @@ describe("perfective roots", () => {
}, },
], ],
}, },
{
title: "special giving verbs",
tests: [
{
verb: warkawul,
result: [
[{ type: "PH", ps: { p: "ور", f: "wár" } }],
[
{
type: "VB",
ps: {
long: [{ p: "کړل", f: "kRul" }],
short: [{ p: "کړ", f: "kR" }],
mini: [{ p: "ک", f: "k" }],
},
},
],
],
},
{
verb: darkawul,
result: [
[{ type: "PH", ps: { p: "در", f: "dár" } }],
[
{
type: "VB",
ps: {
long: [{ p: "کړل", f: "kRul" }],
short: [{ p: "کړ", f: "kR" }],
mini: [{ p: "ک", f: "k" }],
},
},
],
],
},
{
verb: raakawul,
result: [
[{ type: "PH", ps: { p: "را", f: "ráa" } }],
[
{
type: "VB",
ps: {
long: [{ p: "کړل", f: "kRul" }],
short: [{ p: "کړ", f: "kR" }],
mini: [{ p: "ک", f: "k" }],
},
},
],
],
},
],
},
{ {
title: "is the special form with tlul", title: "is the special form with tlul",
tests: [ tests: [

View File

@ -10,6 +10,7 @@ import { concatPsString, trimOffPs } from "../p-text-helpers";
import * as T from "../../../types"; import * as T from "../../../types";
import { makePsString, removeFVarientsFromVerb } from "../accent-and-ps-utils"; import { makePsString, removeFVarientsFromVerb } from "../accent-and-ps-utils";
import { import {
accentOnFront,
accentOnNFromEnd, accentOnNFromEnd,
countSyllables, countSyllables,
removeAccents, removeAccents,
@ -32,6 +33,7 @@ import {
} from "./rs-helpers"; } from "./rs-helpers";
import { inflectPattern3 } from "./new-inflectors"; import { inflectPattern3 } from "./new-inflectors";
import { fmapSingleOrLengthOpts } from "../fp-ps"; import { fmapSingleOrLengthOpts } from "../fp-ps";
import { isGivingVerb } from "../misc-helpers";
export const statVerb = { export const statVerb = {
intransitive: vEntry({ intransitive: vEntry({
@ -250,6 +252,21 @@ function getRoot(
? [[complement], [auxStem]] ? [[complement], [auxStem]]
: [[], [weld(complement, auxStem)]]; : [[], [weld(complement, auxStem)]];
} }
if (isGivingVerb(verb) && aspect === "perfective") {
const auxStem = getRoot(
statVerb.transitive,
genderNum,
"perfective"
)[1][0] as T.VBBasic;
const ph: T.PH = {
type: "PH",
ps: accentOnFront({
p: verb.entry.p.slice(0, 2),
f: verb.entry.f.slice(0, 3),
}),
};
return [[ph], [auxStem]];
}
const base = const base =
aspect === "imperfective" aspect === "imperfective"
? accentOnNFromEnd(makePsString(verb.entry.p, verb.entry.f), 0) ? accentOnNFromEnd(makePsString(verb.entry.p, verb.entry.f), 0)
@ -320,6 +337,21 @@ function getStem(
? [[complement], [auxStem]] ? [[complement], [auxStem]]
: [[], [weld(complement, auxStem)]]; : [[], [weld(complement, auxStem)]];
} }
if (isGivingVerb(verb) && aspect === "perfective") {
const auxStem = getStem(
statVerb.transitive,
genderNum,
"perfective"
)[1][0] as T.VBBasic;
const ph: T.PH = {
type: "PH",
ps: accentOnFront({
p: verb.entry.p.slice(0, 2),
f: verb.entry.f.slice(0, 3),
}),
};
return [[ph], [auxStem]];
}
if (aspect === "perfective") { if (aspect === "perfective") {
if (verb.entry.f === "tlul") { if (verb.entry.f === "tlul") {
return tlulPerfectiveStem(genderNum); return tlulPerfectiveStem(genderNum);

View File

@ -7,46 +7,47 @@
*/ */
module.exports = [ module.exports = [
1527815216, // راتلل - to come 1585228579997, // ورتلل
1527813473, // الوتل - to fly 1527815216, // راتلل - to come
1527814012, // اوښتل - to pass over, overturn, be flipped over, spill over, shift, change, diverge, pass, cross, abandon 1527813473, // الوتل - to fly
1527822843, // برېښېدل - to appear, seem; to shine, sparkle; to smart, have a pricking pain 1527814012, // اوښتل - to pass over, overturn, be flipped over, spill over, shift, change, diverge, pass, cross, abandon
1527815183, // پوهېدل - to understand (to do the act of understanding) 1527822843, // برېښېدل - to appear, seem; to shine, sparkle; to smart, have a pricking pain
1527816495, // تښتېدل - to run off, escape, flee 1527815183, // پوهېدل - to understand (to do the act of understanding)
1527811442, // توانېدل - become able, become strong or good enough to… 1527816495, // تښتېدل - to run off, escape, flee
1527813022, // ټوخېدل - to cough 1527811442, // توانېدل - become able, become strong or good enough to…
1527817259, // پرېوتل - to fall 1527813022, // ټوخېدل - to cough
1577572987826, // جنګېدل - to fight, battle, war, to bump or crash into 1527817259, // پرېوتل - to fall
1527818535, // ځړېدل - to hang, to be hung, to be lowered 1577572987826, // جنګېدل - to fight, battle, war, to bump or crash into
1527812273, // ځلېدل - to shine, glow, glitter 1527818535, // ځړېدل - to hang, to be hung, to be lowered
1577921634357, // ځنډېدل - to be delayed, postponed, held back, detained 1527812273, // ځلېدل - to shine, glow, glitter
1527814025, // ختل - to climb, ascend, rise, go up; to fall out, to fall off, to leave/dissapear; to turn out to be ... 1577921634357, // ځنډېدل - to be delayed, postponed, held back, detained
1527823376, // وتل - to go out 1527814025, // ختل - to climb, ascend, rise, go up; to fall out, to fall off, to leave/dissapear; to turn out to be ...
1527814433, // خوځېدل - to shake, tremble, wiggle, move, vibrate 1527823376, // وتل - to go out
1527818980, // رپېدل - to quiver, shake, flutter, shiver 1527814433, // خوځېدل - to shake, tremble, wiggle, move, vibrate
1578191534500, // رحمېدل - to have mercy on, to have compassion on 1527818980, // رپېدل - to quiver, shake, flutter, shiver
1527813573, // رسېدل - reach, arrive; (fig.) understand, attain to; mature, ripen 1578191534500, // رحمېدل - to have mercy on, to have compassion on
1527813710, // زېږېدل - to be born, to appear, arise 1527813573, // رسېدل - reach, arrive; (fig.) understand, attain to; mature, ripen
1527813837, // سوځېدل - to burn 1527813710, // زېږېدل - to be born, to appear, arise
1527814597, // شرمېدل - to be ashamed, to be embarrassed, to be shy 1527813837, // سوځېدل - to burn
1527821558, // شړېدل - to be decomposed, break down, fall apart; to be boiled soft (meat) 1527814597, // شرمېدل - to be ashamed, to be embarrassed, to be shy
1527811516, // شلېدل - to be torn, broken, rent, broken, severed 1527821558, // شړېدل - to be decomposed, break down, fall apart; to be boiled soft (meat)
1527812615, // غځېدل - stretch out, lie, be extended, expand 1527811516, // شلېدل - to be torn, broken, rent, broken, severed
1527813680, // غږېدل - to converse, speak, talk, sing 1527812615, // غځېدل - stretch out, lie, be extended, expand
1527814867, // غورځېدل - to jump, leap, fall 1527813680, // غږېدل - to converse, speak, talk, sing
1578682066756, // غوړېدل - to be spread, extended, opened, unfolded; to fall with arms flailing; to blossom, to be set with mines (military) 1527814867, // غورځېدل - to jump, leap, fall
1527823696, // غولېدل - to be deceived, cheated, fooled 1578682066756, // غوړېدل - to be spread, extended, opened, unfolded; to fall with arms flailing; to blossom, to be set with mines (military)
1527812759, // کېناستل - to sit 1527823696, // غولېدل - to be deceived, cheated, fooled
1527812645, // ګرځېدل - to walk, wander, turn about; to become, to be 1527812759, // کېناستل - to sit
1527814430, // لړزېدل - to shake, shudder, tremble, vibrate 1527812645, // ګرځېدل - to walk, wander, turn about; to become, to be
1527814085, // لګېدل - to be busy or in motion, to be spent, to flare up, to hit, crash, touch, to suit / fit / conform, to seem 1527814430, // لړزېدل - to shake, shudder, tremble, vibrate
1527813994, // لوېدل - to fall, to tumble, go down, settle 1527814085, // لګېدل - to be busy or in motion, to be spent, to flare up, to hit, crash, touch, to suit / fit / conform, to seem
1527823019, // وېرېدل - to be afraid, scared, to fear 1527813994, // لوېدل - to fall, to tumble, go down, settle
1581086654898, // کېدل - to become _____ 1527823019, // وېرېدل - to be afraid, scared, to fear
1527812754, // کېدل - to happen, occur 1581086654898, // کېدل - to become _____
1527815348, // تلل - to go 1527812754, // کېدل - to happen, occur
1527815216, // راتلل - to come 1527815348, // تلل - to go
1527819674, // څملاستل - to lie down 1527815216, // راتلل - to come
1581086654898, // کېدل - to become 1527819674, // څملاستل - to lie down
1527812754, // کېدل - to happen 1581086654898, // کېدل - to become
1527812754, // کېدل - to happen
]; ];

View File

@ -7,86 +7,88 @@
*/ */
module.exports = [ module.exports = [
1527814617, // نیول - to take 1527819279, // راکول
1527811872, // اچول - to put, pour, drop, throw, put on 1527813914, // ورکول
1527817298, // اخیستل - to take, buy, purchase, receive; to shave, cut with scissors 1527814617, // نیول - to take
1527816127, // اړول - to turn over, flip over; convert, change; to move over to, establish oneself in a new spot; divert, turn away, hijack 1527811872, // اچول - to put, pour, drop, throw, put on
1527811605, // ازمویل - to attempt, try; to experiment, test 1527817298, // اخیستل - to take, buy, purchase, receive; to shave, cut with scissors
1527812458, // استول - to send 1527816127, // اړول - to turn over, flip over; convert, change; to move over to, establish oneself in a new spot; divert, turn away, hijack
1527811397, // اغوستل - to wear, to put on (clothes) 1527811605, // ازمویل - to attempt, try; to experiment, test
1527816125, // الوزول - to make fly, to toss, to release (birds); to blow up 1527812458, // استول - to send
1527816146, // ایستل - to throw out, discard, chuck, toss; to extract, to take out 1527811397, // اغوستل - to wear, to put on (clothes)
1527817786, // بخښل - to forgive, to pardon 1527816125, // الوزول - to make fly, to toss, to release (birds); to blow up
1527816092, // بلل - to call, invite; to consider, deem 1527816146, // ایستل - to throw out, discard, chuck, toss; to extract, to take out
1577389204616, // پرانیستل - to open; to undo; to initiate 1527817786, // بخښل - to forgive, to pardon
1527819396, // پرځول - to throw down, to topple, overcome, wrestle to the ground 1527816092, // بلل - to call, invite; to consider, deem
1527816874, // پلورل - to sell 1577389204616, // پرانیستل - to open; to undo; to initiate
1527813647, // پوښتل - to ask, question 1527819396, // پرځول - to throw down, to topple, overcome, wrestle to the ground
1527815190, // پرېښودل - to quit 1527816874, // پلورل - to sell
1527815216, // راتلل - to come 1527813647, // پوښتل - to ask, question
1527812284, // کېښودل - to put 1527815190, // پرېښودل - to quit
1577394422280, // پوهول - to explain, to try to make understand 1527815216, // راتلل - to come
1527815165, // پېژندل - to recognize, know, meet 1527812284, // کېښودل - to put
1527813405, // تړل - to connect, tie, bind, close 1577394422280, // پوهول - to explain, to try to make understand
1527816494, // تښتول - to drive off, steal, abduct, kidnap 1527815165, // پېژندل - to recognize, know, meet
1527813394, // ټاکل - to select, appoint 1527813405, // تړل - to connect, tie, bind, close
1527821498, // ټکول - to knock, pound, crush, grind, hammer 1527816494, // تښتول - to drive off, steal, abduct, kidnap
1527818537, // ځړول - to hang, to suspend, to lower down, to let down 1527813394, // ټاکل - to select, appoint
1527813046, // ځنډول - to delay, to postpone, to hold back, to detain 1527821498, // ټکول - to knock, pound, crush, grind, hammer
1527820418, // ځورول - to bother, irritate, torture, distress, vex, grind on 1527818537, // ځړول - to hang, to suspend, to lower down, to let down
1527814586, // چلول - to drive, operate, handle, put forward, circulate 1527813046, // ځنډول - to delay, to postpone, to hold back, to detain
1527816564, // چیچل - to bite, chew, grind (teeth), clench (teeth), sting 1527820418, // ځورول - to bother, irritate, torture, distress, vex, grind on
1527812790, // خوړل - to eat, to bite 1527814586, // چلول - to drive, operate, handle, put forward, circulate
1527823551, // خېژول - load, upload, boost, cause to climb, cause to get on/in (a boat etc.) 1527816564, // چیچل - to bite, chew, grind (teeth), clench (teeth), sting
1527815489, // داړل - to bite, tear, gnaw 1527812790, // خوړل - to eat, to bite
1527812544, // درول - to stop (active, causative); to stand, set up, put in place; to bring in, introduce; to advance/field (an army/troops) 1527823551, // خېژول - load, upload, boost, cause to climb, cause to get on/in (a boat etc.)
1527816533, // رټل - to tell off, berate, banish, drive off 1527815489, // داړل - to bite, tear, gnaw
1527813572, // رسول - to deliver, to make arrive, provide, send, supply, bring to, 1527812544, // درول - to stop (active, causative); to stand, set up, put in place; to bring in, introduce; to advance/field (an army/troops)
1527819880, // رېبل - to reap, harvest 1527816533, // رټل - to tell off, berate, banish, drive off
1527816064, // زغمل - to endure, bear, tolerate, take on, digest 1527813572, // رسول - to deliver, to make arrive, provide, send, supply, bring to,
1527811485, // زېږول - to give birth, to bear, create 1527819880, // رېبل - to reap, harvest
1527813637, // ستایل - to praise, commend, glorify, mention 1527816064, // زغمل - to endure, bear, tolerate, take on, digest
1527817750, // سکل - to drink 1527811485, // زېږول - to give birth, to bear, create
1527811625, // سنجول - to think over, deliberate, examine, think, develop 1527813637, // ستایل - to praise, commend, glorify, mention
1527813831, // سوځول - to cause to burn, set on fire 1527817750, // سکل - to drink
1527814596, // شرمول - to shame, to disgrace, to dishonor 1527811625, // سنجول - to think over, deliberate, examine, think, develop
1527814908, // شړل - to drive out, fire, evict, push out 1527813831, // سوځول - to cause to burn, set on fire
1527815531, // شکول - to tear, to break of, to dig up, to pull out 1527814596, // شرمول - to shame, to disgrace, to dishonor
1527815296, // شمارل - to count 1527814908, // شړل - to drive out, fire, evict, push out
1527815273, // شمېرل - to count 1527815531, // شکول - to tear, to break of, to dig up, to pull out
1527811293, // ښودل - to show; to teach; to suit, look good with (fig.), befit 1527815296, // شمارل - to count
1527817865, // غځول - to extend, to stretch out, to expand 1527815273, // شمېرل - to count
1527817622, // غړول - to open or roll (the eyes) 1527811293, // ښودل - to show; to teach; to suit, look good with (fig.), befit
1527820150, // غږول - to make a sound, pronounce, to sing, to play (an instrument), to resound; to make someone talk, to get information 1527817865, // غځول - to extend, to stretch out, to expand
1527815886, // غندل - to condemn, reproach, to criticize 1527817622, // غړول - to open or roll (the eyes)
1527816122, // غورځول - to throw, hurl, fling 1527820150, // غږول - to make a sound, pronounce, to sing, to play (an instrument), to resound; to make someone talk, to get information
1527812627, // غوښتل - to want, to request 1527815886, // غندل - to condemn, reproach, to criticize
1527819301, // غولول - to deceive, cheat, fool 1527816122, // غورځول - to throw, hurl, fling
1527813568, // کارول - to use, utilize 1527812627, // غوښتل - to want, to request
1527816300, // کرل - to sow, to plant 1527819301, // غولول - to deceive, cheat, fool
1527819378, // کندل - to dig 1527813568, // کارول - to use, utilize
1527811289, // کېنول - to seat, to make or have someone sit down 1527816300, // کرل - to sow, to plant
1527817661, // ګالل - to bear up under (diffucult things), to suffer, to take, to endure 1527819378, // کندل - to dig
1527812649, // ګټل - to earn (money), to win 1527811289, // کېنول - to seat, to make or have someone sit down
1527812612, // ګنډل - to sew, mend, make, knit 1527817661, // ګالل - to bear up under (diffucult things), to suffer, to take, to endure
1527812000, // ګڼل - to count, consider, reckon, suppose, assume 1527812649, // ګټل - to earn (money), to win
1527822144, // ګواښل - to threaten 1527812612, // ګنډل - to sew, mend, make, knit
1527812873, // لوستل - to read, study 1527812000, // ګڼل - to count, consider, reckon, suppose, assume
1527816453, // ګومارل - to appoint, assign, delegate; load, charge 1527822144, // ګواښل - to threaten
1527812869, // لټول - to search, seek 1527812873, // لوستل - to read, study
1527818206, // لړزول - to shake, rattle, cause to shake 1527816453, // ګومارل - to appoint, assign, delegate; load, charge
1527813866, // لېږل - to send 1527812869, // لټول - to search, seek
1527812856, // لیکل - to write 1527818206, // لړزول - to shake, rattle, cause to shake
1527815085, // منل - to accept, to believe 1527813866, // لېږل - to send
1527815399, // وهل - to hit 1527812856, // لیکل - to write
1527823020, // وېرول - to make afraid, to scare, to make fear 1527815085, // منل - to accept, to believe
1527811701, // وېشل - divide, distribute, share 1527815399, // وهل - to hit
1579015359582, // کول - to make ____ ____ (as in "He's making me angry.") 1527823020, // وېرول - to make afraid, to scare, to make fear
1527812752, // کول - to do (an action or activity) 1527811701, // وېشل - divide, distribute, share
1527816865, // وړل 1579015359582, // کول - to make ____ ____ (as in "He's making me angry.")
1527815214, // راوړل - to bring 1527812752, // کول - to do (an action or activity)
1527819827, // راوستل - to bring 1527816865, // وړل
1527812275, // لیدل - to see 1527815214, // راوړل - to bring
1579015359582, // کول - to make 1527819827, // راوستل - to bring
1527812752, // کول - to do 1527812275, // لیدل - to see
1579015359582, // کول - to make
1527812752, // کول - to do
]; ];