diff --git a/package.json b/package.json index 661e23d..e1fec25 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@formkit/auto-animate": "^1.0.0-beta.1", "@fortawesome/fontawesome-free": "^5.15.4", "@lingdocs/lingdocs-main": "^0.3.1", - "@lingdocs/pashto-inflector": "^3.6.0", + "@lingdocs/pashto-inflector": "^3.6.2", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", diff --git a/src/components/BasicVerbShowCase.tsx b/src/components/BasicVerbShowCase.tsx index 294701c..57a8181 100644 --- a/src/components/BasicVerbShowCase.tsx +++ b/src/components/BasicVerbShowCase.tsx @@ -11,6 +11,7 @@ import { removeFVarients, isPastTense, getPassiveRootsAndStems, + getAbilityRootsAndStems, } from "@lingdocs/pashto-inflector"; import { isImperativeTense, isPerfectTense } from "@lingdocs/pashto-inflector/dist/lib/type-predicates"; import { useState } from "react"; @@ -19,10 +20,11 @@ import { basicVerbs, intransitivePast } from "../content/verbs/basic-present-ver import { getLength } from "@lingdocs/pashto-inflector/dist/lib/p-text-helpers"; import { isThirdPerson } from "@lingdocs/pashto-inflector/dist/lib/phrase-building/vp-tools"; -function BasicVerbShowCase({ opts, tense, passive }: { +function BasicVerbShowCase({ opts, tense, passive, ability }: { opts: T.TextOptions, tense: T.VerbTense | T.ImperativeTense, - passive?: boolean, + passive?: boolean, + ability?: boolean, }) { const items = isPastTense(tense) ? intransitivePast @@ -35,6 +37,7 @@ function BasicVerbShowCase({ opts, tense, passive }: { }}, body: ("active"); + const [category, setCategory] = useState<"basic" | "ability">("basic"); const [negative, setNegative] = useState(false); const [length, setLength] = useState<"short" | "long">("short"); const c = conjugateVerb(verb.entry, verb.complement); @@ -60,7 +65,7 @@ function BasicVerbChart({ verb, opts, tense, passive }: { : "grammaticallyTransitive" in c ? c.grammaticallyTransitive : c; - const phrasesForTable = makeExamplePhrases(verb, tense, negative, length, voice); + const phrasesForTable = makeExamplePhrases(verb, tense, negative, length, voice, category); return
{getEnglishVerb(verb.entry)} @@ -78,9 +83,24 @@ function BasicVerbChart({ verb, opts, tense, passive }: { handleChange={setVoice} />
} + {ability &&
+ +
}
- {isPastTense(tense) && !isPerfectTense(tense) &&
+ {((isPastTense(tense) && !isPerfectTense(tense)) || category === "ability") &&
{ + {"blocks":[{"key":0.7144630314236184,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"pronoun","person":0,"distance":"far"}}}},{"key":0.3237406469603912,"block":{"type":"objectSelection","selection":{"type":"NP","selection":{"type":"pronoun","person":2,"distance":"far"}}}}],"verb":{"type":"verb","verb":{"entry":{"ts":1527812275,"i":11624,"p":"لیدل","f":"leedul","g":"leedul","e":"to see","c":"v. trans./gramm. trans.","psp":"وین","psf":"ween","tppp":"لید","tppf":"leed","ec":"see,sees,seeing,saw,seen"}},"verbTense":"presentVerb","perfectTense":"presentPerfect","imperativeTense":"imperfectiveImperative","tenseCategory":"modal","transitivity":"transitive","isCompound":false,"voice":"active","negative":false,"canChangeTransitivity":true,"canChangeVoice":true,"canChangeStatDyn":false},"form":{"removeKing":false,"shrinkServant":false}} +} + +{ + {"blocks":[{"key":0.22382799925273678,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"pronoun","person":0,"distance":"far"}}}},{"key":0.8844517944804815,"block":{"type":"objectSelection","selection":"none"}}],"verb":{"type":"verb","verb":{"entry":{"ts":1527815216,"i":6642,"p":"راتلل","f":"raatlúl","g":"raatlul","e":"to come","c":"v. intrans. irreg.","psp":"راځ","psf":"raadz","ssp":"راش","ssf":"ráash","prp":"راغلل","prf":"ráaghlul","pprtp":"راغلی","pprtf":"raaghúley","tppp":"راغی","tppf":"ráaghey","noOo":true,"separationAtP":2,"separationAtF":3,"ec":"come,comes,coming,came,come"}},"verbTense":"presentVerb","perfectTense":"presentPerfect","imperativeTense":"imperfectiveImperative","tenseCategory":"modal","transitivity":"intransitive","isCompound":false,"voice":"active","negative":true,"canChangeTransitivity":false,"canChangeVoice":false,"canChangeStatDyn":false},"form":{"removeKing":false,"shrinkServant":false}} +} + +## Making the ability roots and stems + +To make these "ability" forms we will need to modify the 🌳 roots and stems of the verb. + +1. Use the roots for the stems as well +2. Add a tail or +3. Add the *perfective* roots and stems of + +
+
+
+ +
+
+
+
+
ی - ey /
+
ای - aay
+
+
+
+
+ +
+
+
+ +Have a look through these verbs and notice how the same formula is always used to make the "ability" roots and stems. + + + +## Using the ability roots and stems + +🚧 IN PROGRESS ... diff --git a/src/content/verbs/verb-tree-ability-roots-copy.svg b/src/content/verbs/verb-tree-ability-roots-copy.svg new file mode 100644 index 0000000..36e6180 --- /dev/null +++ b/src/content/verbs/verb-tree-ability-roots-copy.svg @@ -0,0 +1,904 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Imperfective + Perfective + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/content/verbs/verb-tree-half-kedul.svg b/src/content/verbs/verb-tree-half-kedul.svg new file mode 100644 index 0000000..fd2798b --- /dev/null +++ b/src/content/verbs/verb-tree-half-kedul.svg @@ -0,0 +1,963 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Imperfective + Perfective + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/content/verbs/verb-tree-half-kedul.svg.2022_07_28_16_19_58.0.svg b/src/content/verbs/verb-tree-half-kedul.svg.2022_07_28_16_19_58.0.svg new file mode 100644 index 0000000..d915a00 --- /dev/null +++ b/src/content/verbs/verb-tree-half-kedul.svg.2022_07_28_16_19_58.0.svg @@ -0,0 +1,869 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Imperfective + Perfective + + + + + + + + + + + + + + + + + + + + شول + + diff --git a/src/content/verbs/verb-tree-half-kedul.svg.2022_07_28_16_23_16.0.svg b/src/content/verbs/verb-tree-half-kedul.svg.2022_07_28_16_23_16.0.svg new file mode 100644 index 0000000..4d13568 --- /dev/null +++ b/src/content/verbs/verb-tree-half-kedul.svg.2022_07_28_16_23_16.0.svg @@ -0,0 +1,888 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Imperfective + Perfective + + + + + + + + + + + + + + + + + + + + شول + + + diff --git a/yarn.lock b/yarn.lock index bfefbbf..6f5fd6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1803,10 +1803,10 @@ rambda "^6.7.0" react-select "^5.2.2" -"@lingdocs/pashto-inflector@^3.5.9": - version "3.5.9" - resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-3.5.9.tgz#3402f382c6818c0ab9d823537a3291764f4de0bd" - integrity sha512-A1+Fz7/n1HdC7yWliEKuGiFtEW/eDSn0OeQpFd617ZgsykNmyt3n/hlkojsOHKs+1gLNoi0zS7Xc+XUn63dXKw== +"@lingdocs/pashto-inflector@^3.6.2": + version "3.6.2" + resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-3.6.2.tgz#122eaeaac59253ea0ee708d772e860502aa1d6b7" + integrity sha512-hHvgJPrNAp/ZBvZRsm++X2vFnZyuVrpE54YWPubwk+1Xn+28otoJ34r/OsN4N7eXrXBcxawYsWhf/ot9D987GQ== dependencies: "@formkit/auto-animate" "^1.0.0-beta.1" classnames "^2.2.6"