diff --git a/package.json b/package.json index cca338a..47f9519 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "@formkit/auto-animate": "^1.0.0-beta.1", "@fortawesome/fontawesome-free": "^5.15.4", "@lingdocs/lingdocs-main": "^0.3.1", - "@lingdocs/pashto-inflector": "^2.8.8", + "@lingdocs/pashto-inflector": "^2.9.0", "@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/phrase-diagram/EditableEPEx.tsx b/src/components/phrase-diagram/EditableEPEx.tsx index e8fe3d7..1c03bcd 100644 --- a/src/components/phrase-diagram/EditableEPEx.tsx +++ b/src/components/phrase-diagram/EditableEPEx.tsx @@ -18,9 +18,10 @@ function EditableEPEx({ children, opts }: { children: T.EPSelectionState, opts: setEditing(false); setEps(children); } - return
+ return
setEditing(true)} > {!editing ? : } @@ -32,7 +33,13 @@ function EditableEPEx({ children, opts }: { children: T.EPSelectionState, opts: eps={eps} onChange={setEps} />} - +
; } diff --git a/src/content/phrase-structure/ep.mdx b/src/content/phrase-structure/ep.mdx index b9183f9..bac70b7 100644 --- a/src/content/phrase-structure/ep.mdx +++ b/src/content/phrase-structure/ep.mdx @@ -11,7 +11,7 @@ import { import psmd from "../../lib/psmd"; import Link from "../../components/Link"; import EquativeIllustration from "../../components/EquativeIllustration"; -import EditableEPEx from "../../components/phrase-diagram/EditableEPEx"; +import EditableEPEx, { EditIcon } from "../../components/phrase-diagram/EditableEPEx"; import BasicBlocks from "../../components/BasicBlocks" @@ -55,7 +55,7 @@ An **EP complement** is one of four things: - sandwich - complement noun -Let's look at some examples using each of these kinds of complements. +Let's look at some examples using each of these kinds of complements. Click on the to see how the phrase in divided into blocks and click on the to change things and play around with the phrase. #### With an adjective @@ -83,6 +83,8 @@ A location adverb is a word that describes the location of the subject. Don't wo #### With a sandwich +You can also use any kind of sandwich to describe the subject of an EP. + { {"blocks":[{"key":0.0539623363055568,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"pronoun","person":1,"distance":"far"}}}}],"predicate":{"type":"Complement","Complement":{"type":"EQComp","selection":{"type":"sandwich","before":{"p":"له","f":"la"},"after":{"p":"سره","f":"sara"},"e":"with","inside":{"type":"NP","selection":{"type":"pronoun","person":3,"distance":"far"}}}}},"equative":{"tense":"present","negative":false},"omitSubject":false} } @@ -91,9 +93,10 @@ A location adverb is a word that describes the location of the subject. Don't wo {"blocks":[{"key":0.0539623363055568,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"pronoun","person":4,"distance":"far"}}}}],"predicate":{"type":"Complement","Complement":{"type":"EQComp","selection":{"type":"sandwich","before":{"p":"په","f":"pu"},"after":{"p":"کې","f":"ke"},"e":"in","inside":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527812828,"i":10540,"p":"کور","f":"kor","g":"kor","e":"house, home","c":"n. m."},"gender":"masc","genderCanChange":false,"number":"singular","numberCanChange":true,"adjectives":[]}}}}},"equative":{"tense":"present","negative":false},"omitSubject":false} } - #### With a complement noun +COMING SOON... + ## 2. NP + NP NP is an NP. When you do this, the equative always agrees with the last NP. + +{ + {"blocks":[{"key":0.0539623363055568,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527812817,"i":10010,"p":"کتاب","f":"kitáab","g":"kitaab","e":"book","c":"n. m."},"gender":"masc","genderCanChange":false,"number":"plural","numberCanChange":true,"adjectives":[]}}}}],"predicate":{"type":"NP","NP":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527819521,"i":5824,"p":"خوشالي","f":"khoshaalee","g":"khoshaalee","e":"happiness (خوشحالي)","c":"n. f."},"gender":"fem","genderCanChange":false,"number":"singular","numberCanChange":true,"adjectives":[]}}},"equative":{"tense":"present","negative":false},"omitSubject":false} +} + +{ + {"blocks":[{"key":0.0539623363055568,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527819521,"i":5824,"p":"خوشالي","f":"khoshaalee","g":"khoshaalee","e":"happiness (خوشحالي)","c":"n. f."},"gender":"fem","genderCanChange":false,"number":"singular","numberCanChange":true,"adjectives":[]}}}}],"predicate":{"type":"NP","NP":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527812817,"i":10010,"p":"کتاب","f":"kitáab","g":"kitaab","e":"book","c":"n. m."},"gender":"masc","genderCanChange":false,"number":"plural","numberCanChange":true,"adjectives":[]}}},"equative":{"tense":"present","negative":false},"omitSubject":false} +} + +## Adding APs + +You can add as many APs as you like to a phrase. For example if we wanted to say that the weather is good here we can add the APs . + +{ +{"blocks":[{"key":0.925654634890972,"block":{"type":"AP","selection":{"type":"adverb","entry":{"ts":1527812558,"i":6251,"p":"دلته","f":"dălta","g":"dalta","e":"here","c":"loc. adv."}}}},{"key":0.0539623363055568,"block":{"type":"subjectSelection","selection":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527812672,"i":14045,"p":"هوا","f":"hawaa","g":"hawaa","e":"air, atmosphere; weather","c":"n. f."},"gender":"fem","genderCanChange":false,"number":"singular","numberCanChange":true,"adjectives":[]}}}}],"predicate":{"type":"Complement","NP":{"type":"NP","selection":{"type":"noun","entry":{"ts":1527812817,"i":10010,"p":"کتاب","f":"kitáab","g":"kitaab","e":"book","c":"n. m."},"gender":"masc","genderCanChange":false,"number":"plural","numberCanChange":true,"adjectives":[]}},"Complement":{"type":"EQComp","selection":{"type":"adjective","entry":{"ts":1527812796,"i":8655,"p":"ښه","f":"xu","g":"xu","e":"good","c":"adj."}}}},"equative":{"tense":"present","negative":false},"omitSubject":false} +} + +Try adding clicking the and adding other APs to this or other examples above. diff --git a/yarn.lock b/yarn.lock index fe0c3bc..590b87e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1695,10 +1695,10 @@ rambda "^6.7.0" react-select "^5.2.2" -"@lingdocs/pashto-inflector@^2.8.8": - version "2.8.8" - resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-2.8.8.tgz#4d33dae9716a7284f57aa1aa4ded8c0468b9740f" - integrity sha512-IiM+6upS96S0pm/0ewkqG8EVM7c6A6+LaBmJ2kbiKCyNHhv4V8WOE9wFT1oSCJMeWuCJsJL3MZaeDifCFqXBjQ== +"@lingdocs/pashto-inflector@^2.9.0": + version "2.9.0" + resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-2.9.0.tgz#92a9ae28bd18983d2e44b37d34ad03bcfa61f925" + integrity sha512-gEZWPZWvDSOnNkbJ0ew3NXLViy4vYSlOyvg0vwDLfAzbQLEN3/tzrp/17LT8H+7aHPa8SRiiaJIG0A4HpTuKxw== dependencies: "@formkit/auto-animate" "^1.0.0-beta.1" classnames "^2.2.6"