some work on sandwiches

This commit is contained in:
lingdocs 2021-09-04 18:42:54 +04:00
parent a7cfc4bcbc
commit b7a71e2ab1
8 changed files with 555 additions and 9 deletions

View File

@ -122,7 +122,7 @@ export default function() {
return <Game return <Game
questions={questions} questions={questions}
Display={Display} Display={Display}
timeLimit={150} timeLimit={130}
Instructions={Instructions} Instructions={Instructions}
/> />
}; };

View File

@ -37,6 +37,8 @@ import * as inflectionIntro from "!babel-loader!mdx-loader!./inflection/inflecti
import * as inflectionPatterns from "!babel-loader!mdx-loader!./inflection/inflection-patterns.mdx"; import * as inflectionPatterns from "!babel-loader!mdx-loader!./inflection/inflection-patterns.mdx";
import * as feminineInflection from "!babel-loader!mdx-loader!./inflection/feminine-inflection.mdx"; import * as feminineInflection from "!babel-loader!mdx-loader!./inflection/feminine-inflection.mdx";
import * as sandwiches from "!babel-loader!mdx-loader!./sandwiches/sandwiches.mdx";
import * as theFiveYeys from "!babel-loader!mdx-loader!./writing/the-five-yeys.mdx"; import * as theFiveYeys from "!babel-loader!mdx-loader!./writing/the-five-yeys.mdx";
import * as typingIssues from "!babel-loader!mdx-loader!./writing/typing-issues.mdx"; import * as typingIssues from "!babel-loader!mdx-loader!./writing/typing-issues.mdx";
@ -150,7 +152,7 @@ const contentTree = [
], ],
}, },
{ {
heading: "Inflection", heading: "Inflection 🔘",
subdirectory: "inflection", subdirectory: "inflection",
chapters: [ chapters: [
{ {
@ -168,7 +170,17 @@ const contentTree = [
], ],
}, },
{ {
heading: "Writing", heading: "Sandwiches 🥪",
subdirectory: "sandwiches",
chapters: [
{
import: sandwiches,
slug: "sandwiches",
},
],
},
{
heading: "Writing 🖊",
subdirectory: "writing", subdirectory: "writing",
chapters: [ chapters: [
{ {

View File

@ -88,7 +88,7 @@ These words are a little irregular but you can see a common patten based around:
**Note**: Nouns in this pattern will often only use the first inflection for the plural. Adjectives will use the 1st inflection for all 3 reasons. **Note**: Nouns in this pattern will often only use the first inflection for the plural. Adjectives will use the 1st inflection for all 3 reasons.
## 5. Shorter words that take <InlinePs opts={opts} ps={{ p: "ـه", f: "-u" }} /> ## 5. Shorter words that squish
These are also a little irregular but instead of lengthening the 1st masculine inflection they compress it as well and take just an <InlinePs opts={opts} ps={{ p: "ـه", f: "-u" }} /> on the end. These are also a little irregular but instead of lengthening the 1st masculine inflection they compress it as well and take just an <InlinePs opts={opts} ps={{ p: "ـه", f: "-u" }} /> on the end.

View File

@ -172,7 +172,7 @@ If the accent comes on the end of the word, the femine form is a little differen
} }
]} /> ]} />
### 5. Shorter words that take <InlinePs opts={opts} ps={{ p: "ـه", f: "-u" }} /> ### 5. Shorter words that squish
<GenderTable rows={[ <GenderTable rows={[
{ {

View File

@ -0,0 +1,104 @@
---
title: Sandwiches 🥪
---
import Link from "../../components/Link";
import {
Examples,
defaultTextOptions as opts,
} from "@lingdocs/pashto-inflector";
import sandwiches from "./sandwiches";
## What are Sandwiches?
In Pashto there are **little particles that get attached to the front, back, or both sides of a word.**
We will call these *sandwiches*, but in fancy grammer terms these are called [adpositions](https://en.wikipedia.org/wiki/Preposition_and_postposition).
In English we have just one kind of these sandwiches, the [preposition](https://en.wikipedia.org/wiki/Preposition_and_postposition), which is something that is stuck in front of a noun/pronoun. For example: I am going <u><strong>to</strong> school</u>. I'm making supper <u><strong>for</strong> you</u>.
But in Pashto there are actually three kinds of these sandwiches:
- Preposition - sticks to the beginning of the word 🍞🥓 (like we've seen already in English)
- Postposition - sticks to the end of the word 🥓🍞 (...interesting)
- Circumposition - surrounds the word on both sides! 🍞🥓🍞 (... 🤯)
This last kind is probably the newest and most surprising to language learners. Not many languages do this where they have particles that surround a word on both sides.
## Sandwiches and Examples
export function SandwichTable() {
return (
<table class="table table-bordered my-3">
<thead>
<tr>
<th scope="col">Sandwich</th>
<th scope="col">Examples</th>
</tr>
</thead>
<tbody>
{sandwiches.map((s) => {
const pre = s.pre || { p: "", f: "" };
const post = s.post || { p: "", f: "" };
return <tr>
<td>
<Examples opts={opts}>{{
p: `${pre.p} ... ${post.p}`,
f: `${pre.f} ... ${post.f}`,
e: s.e,
}}</Examples>
</td>
<td>
<Examples opts={opts}>
{s.examples}
</Examples>
</td>
</tr>
})}
</tbody>
</table>
);
}
<SandwichTable />
More coming soon... In progress... 👷‍♂️
<!--
<Table size="medium"
titleRow={[{e: "sandwich" }, {e: "example"}]}
rows={
[
...sandwiches.reduce((accumulator, s) => {
const rowsForOneSandwich = [];
const leftSide = {p:`${s.pre.p} ... ${s.post.p}`, f:`${s.pre.f} ... ${s.post.f}`, e: s.e};
s.examples.forEach((ex, i) => {
// If first row or sandwich, show the sandwich and an example
// Otherwise just have an empty left hand side with an example on the right
rowsForOneSandwich.push([i === 0 ? leftSide : {}, {
p:<>{ex.p.before.p} <span className="underline"><strong>{s.pre.p}{s.pre.p && ' '}</strong> {ex.p.mid.p} <strong>{s.post.p && ' '}{s.post.p}</strong></span> {ex.p.after.p}</>,
f:<>{ex.p.before.f} <span className="underline"><strong>{s.pre.f}{s.pre.f && ' '}</strong>{ex.p.mid.f}<strong>{s.post.f && ' '}{s.post.f}</strong></span> {ex.p.after.f}</>,
e:<>{ex.e.before}<span className="underline"><strong>{ex.e.pre}</strong>{ex.e.mid}<strong>{ex.e.post}</strong></span>{ex.e.after}</>
}]);
})
return [...accumulator, ...rowsForOneSandwich];
}, [])
]
} />
And many more!
**Note:** Often you will see slightly different variations on these sandwiches interchanging <Multi t={{p:"د", f:"du"}} /> and <Multi t={{p:"له", f:"la"}} />. Also, sometimes people will leave out one side of the sandwich.
<!-- ### Some take mayo
You will notice that some sandwiches also take <Link to="/inflection/mayonnaise/">mayonnaise</Link>. -->
<!-- ### Exceptional Sandwiches
Usually, words in sandwiches get <Link to="inflection/inflection-intro/">inflected</Link>. However, words inside the following sandwiches are often not inflected for the first inflection:
- <Multi t={{p:"په ... ګې", f:"pu ... ke"}} />
- <Multi t={{p:"په ... باندې", f:"pu ... baande"}} />
- <Multi t={{p:"په ...", f:"pu ..."}} /> -->

View File

@ -0,0 +1,430 @@
import React from "react";
import {
Types as T,
} from "@lingdocs/pashto-inflector";
type SandwichInfo = {
pre?: T.PsString,
post?: T.PsString,
e: string,
examples: (T.PsJSX | T.PsString)[]
}
const sandwiches: SandwichInfo[] = [
{
pre: {p: "په", f: "pu"},
post: {p: "کې", f: "ke"},
e: "in / at",
examples: [
{
p: <>زه <u><strong>په</strong> کور <strong>کې</strong></u> یم</>,
f: <>zu <u><strong>pu</strong> kor <strong>ke</strong></u> yum</>,
e: <>I'm <u><strong>at</strong> home</u></>,
},
{
p: <>هغه <u><strong>په</strong> پارک <strong>کې</strong></u> دی</>,
f: <>haghá <u><strong>pu</strong> paark <strong>ke</strong></u> dey</>,
e: <>He's <u><strong>in</strong> the park</u></>,
},
{
p: <>مونږ <u><strong>په</strong> افغانستان <strong>کې</strong></u> اوسېږو</>,
f: <>moonG <u><strong>pu</strong> afghaanistaan <strong>ke</strong></u> oseGoo</>,
e: <>We live <u><strong>in</strong> Afghanistan</u></>,
},
],
},
{
post: { p: "ته", f: "ta" },
e: "to / towards",
examples: [
{
p: <>زه <u><strong>ښار</strong> ته</u> ځم</>,
f: <>zu <u><strong>xaar</strong> ta</u> dzum</>,
e: <>I'm going <u><strong>to</strong> the city</u></>,
},
{
p: <><u><strong>ما</strong> ته</u> وګوره</>,
f: <><u><strong>maa</strong> ta</u> óogora</>,
e: <>Look <u>at <strong>me</strong></u></>,
},
],
},
{
pre: { p: "د", f: "du" },
e: "of / 's",
examples: [
{
p: <><u><strong>د</strong> یوسف</u> کور هلته دی</>,
f: <><u><strong>du</strong> yoosuf</u> kor halta dey</>,
e: <><u>Yousuf<strong>'s</strong></u> house is there</>,
},
{
p: <>مونږ <u><strong>د</strong> پېشور</u> یو</>,
f: <>moonG <u><strong>du</strong> pexawar</u> yoo</>,
e: <>We are <u><strong>of</strong> Peshawer</u> (ie. We are from Peshawer)</>,
},
{
p: <>د خبره <u><strong>د</strong> منلو</u> نه ده</>,
f: <>daa khoraak <u><strong>du</strong> khoRulo</u> nu dey</>,
e: <>That food is not <u>of eating</u> (ie. It's unfit for eating)</>,
},
],
},
{
pre: { p: "له", f: "la" },
post: { p: "سره", f: "sara" },
e: "with",
examples: [
{
p: <>هغه <u><strong>له</strong> احمد <strong>سره</strong></u> دی</>,
f: <>haghá <u><strong>la</strong> ahmad <strong>sara</strong></u> dey</>,
e: <>He is <u><strong>with</strong> Ahmed</u>.</>,
},
{
p: <>ته <u><strong>له</strong> ما <strong>سره</strong></u> ځې؟</>,
f: <>tu <u><strong>la</strong> maa <strong>sara</strong></u> dze?</>,
e: <>Will you go <u><strong>with</strong> me</u>?</>,
},
],
},
{
pre: { p: "د", f: "du" },
post: { p: "دپاره", f: "dupaara" },
e: "for",
examples: [
{
p: <>دا <u><strong>د</strong> هغې <strong>دپاره</strong></u> دی</>,
f: <>daa <u><strong>du</strong> haghé <strong>dupaara</strong></u> dey</>,
e: <>This is <u><strong>for</strong> her</u></>,
},
],
},
{
pre: { p: "پر", f: "pur" },
post: { p: "باندې", f: "baande" },
e: "on",
examples: [
{
p: <>کتاب <u><strong>پر</strong> مېز <strong>باندې</strong></u> دی</>,
f: <>kitáab <u><strong>pur</strong> mez <strong>baande</strong></u> dey</>,
e: <>The book is <u><strong>on</strong> the table</u></>,
},
],
},
{
pre: { p: "د", f: "du" },
post: { p: "په اړه", f: "pu aRa" },
e: "about / concerning",
examples: [
{
p: <><u><strong>د</strong> تعلیم <strong>په اړه</strong></u> خبرې کوو</>,
f: <><u><strong>du</strong> taleem <strong>pu aRa</strong></u> khabure kawoo</>,
e: <>We are talking <u><strong>about</strong> education</u></>,
},
],
},
{
pre: { p: "د", f: "du" },
post: { p: "په بارې کې", f: "pu baare ke" },
e: "about / concerning",
examples: [
{
p: <><u><strong>د</strong> تعلیم <strong>په بارې کې</strong></u> خبرې کوو</>,
f: <><u><strong>du</strong> taleem <strong>pu baare ke</strong></u> khabure kawoo</>,
e: <>We are talking <u><strong>about</strong> education</u></>,
},
],
},
{
pre: { p: "پر", f: "pur" },
post: { p: "سربېره", f: "sărbera" },
e: "in addition to, along with",
examples: [
{
p: <><u><strong>پر</strong> وچکالۍ <strong>سربېره</strong></u> دلته جنګ هم شته</>,
f: <><u><strong>pur</strong> wuchkaaluy <strong>sărbera</strong></u> dălta jang hum shta</>,
e: <><u><strong>In addition to</strong> drought</u>, there is also war here</>,
},
],
},
];
export default sandwiches;
/*
{
pre: {p: "په", f: "pu"},
post: {p: "سره", f: "sara"},
e: "with (in the adverbial sense)",
examples: [
{
p: {
before: {p:"هغه", f:"hagha"},
mid: {p:"احطیات", f:"ihtiyaat"},
after: {p:"کار کوي", f:"kaar kawee"},
},
e: {
before: "He works ",
pre: "with ",
mid: "caution ",
post: "",
after: "(ie. carefully)",
},
},
]
},
{
pre: {p: "له", f: "la"},
post: {p: "نه", f: "na"},
e: "from / than",
examples: [
{
p: {
before: {p:"اروسه", f:"aroosa"},
mid: {p:"بازار", f:"baazaar"},
after: {p:"راځي", f:"raadzee"},
},
e: {
before: "Aroosa is coming ",
pre: "from",
mid: " the bazaar",
post: "",
after: "",
},
},
]
},
{
pre: {p: "له", f: "la"},
post: {p: "پرته", f: "prata"},
e: "without",
examples: [
{
p: {
before: {p:"دا وړاندېز", f:"daa wRaandez"},
mid: {p:"شرط", f:"shart"},
after: {p:"کړی دی", f:"kuRey dey"},
},
e: {
before: "He's made that offer ",
pre: "without",
mid: " condition",
post: "",
after: "",
},
},
]
},
{
pre: {p: "له", f: "la"},
post: {p: "څخه", f: "tsukha"},
e: "from / than",
examples: [
{
p: {
before: {p:"اروسه", f:"aroosa"},
mid: {p:"بازار", f:"baazaar"},
after: {p:"راځي", f:"raadzee"},
},
e: {
before: "Aroosa is coming ",
pre: "from",
mid: " the bazaar",
post: "",
after: "",
},
},
]
},
{
pre: {p: "له", f: "la"},
post: {p: "راهیسې", f: "raaheese"},
e: "since, for",
examples: [
{
p: {
before: {p:"", f:""},
mid: {p:"درېو کالو", f:"dreyo kaalo"},
after: {p:"کار کوم", f:"kaar kawum"},
},
e: {
before: "I've been working ",
pre: "for ",
mid: "three years",
post: "",
after: "",
},
},
]
},
{
pre: {p: "په", f: "pu"},
post: {p: "باندې", f: "baande"},
e: "on / on top of",
examples: [
{
p: {
before: {p:"کتاب", f:"kitaab"},
mid: {p:"مېز", f:"mez"},
after: {p:"دی", f:"dey"},
},
e: {
before: "The book is ",
pre: "on",
mid: " the table",
post: "",
after: "",
},
},
]
},
{
pre: {p: "د", f: "du"},
post: {p: "لاندې", f: "laande"},
e: "under",
examples: [
{
p: {
before: {p:"کتاب", f:"kitaab"},
mid: {p:"مېز", f:"mez"},
after: {p:"دی", f:"dey"},
},
e: {
before: "The book is ",
pre: "under",
mid: " the table",
post: "",
after: "",
},
},
]
},
{
pre: {p: "تر", f: "tur"},
post: {p: "پورې", f: "pore"},
e: "until/up to",
examples: [
{
p: {
before: {p:"", f:""},
mid: {p:"اوسه", f:"oosa"},
after: {p:"کار کوم", f:"kaar kawum"},
},
e: {
before: "I've been working ",
pre: "up until",
mid: " now",
post: "",
after: "",
},
},
]
},
{
pre: {p: "د", f: "du"},
post: {p: "له مخې", f: "la mukhe"},
e: "according to",
examples: [
{
p: {
before: {p:"هغه", f:"hagha"},
mid: {p:"یو پلان", f:"yo plaan"},
after: {p:"کار کوي", f:"kaar kawee"},
},
e: {
before: "He works ",
pre: "according to",
mid: " a plan",
post: "",
after: "",
},
},
]
},
{
pre: {p: "له", f: "la"},
post: {p: "مخکې", f: "mukhke"},
e: "before",
examples: [
{
p: {
before: {p:"", f:""},
mid: {p:"جنګ", f:"jang"},
after: {p:"خلک خوساله وو", f:"khalk khoshaala woo"},
},
e: {
before: "",
pre: "Before",
mid: " the war",
post: "",
after: " people were happy",
},
},
]
},
{
pre: {p: "له", f: "la"},
post: {p: "وروسته", f: "wroosta"},
e: "after",
examples: [
{
p: {
before: {p:"", f:""},
mid: {p:"جنګ", f:"jang"},
after: {p:"کاروبار خراب شو", f:"kaarobaar kharaab sho"},
},
e: {
before: "",
pre: "After",
mid: " the war",
post: "",
after: " business became bad",
},
},
]
},
{
pre: {p: "د", f: "du"},
post: {p: "نه بعد", f: "na ba'd"},
e: "after",
examples: [
{
p: {
before: {p:"", f:""},
mid: {p:"ډېر وخت", f:"Der wakht"},
after: {p:"خپل کلي ته راغلم", f:"khpul kulee ta raaghlum"},
},
e: {
before: "",
pre: "After",
mid: " a long time",
post: "",
after: " I've come to my own village",
},
},
]
},
{
pre: {p:"بې له", f:"be la"},
post: {p:"ه", f:"a"},
e: "without",
examples: [
{
p: {
before: {p:"داسې کلمې", f:"daase kalime"},
mid: {p:"کوم تغیر", f:"kUm tagheer"},
after: {p:"پښتو ته راننوتې دي", f:"puxto ta raanunawute dee"},
},
e: {
before: "Words like this came into Pashto",
pre: "without",
mid: "any change",
post: "",
},
},
],
},
];
export default sandwiches; */

View File

@ -3,7 +3,7 @@ import Markdown from "markdown-to-jsx";
export default function mdps(input) { export default function mdps(input) {
if (Array.isArray(input)) { if (Array.isArray(input)) {
return input.map((x) => mdps(x)); return input.map(mdps);
} }
return { return {
...input, ...input,

View File

@ -1567,9 +1567,9 @@
chalk "^4.0.0" chalk "^4.0.0"
"@lingdocs/pashto-inflector@^0.9.3": "@lingdocs/pashto-inflector@^0.9.3":
version "0.9.5" version "0.9.6"
resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-0.9.5.tgz#fc2cba942932a5870bdbbb326c9e1112560f8028" resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-0.9.6.tgz#c7b5fe2d0c253cdae48151f667b0248600603819"
integrity sha512-dMT8C16umXz9A6Sxo7H9QP5FI/EkazxFiMPZCymetK++o3JbGJZe1ffLl3TZphl1odpE/NzXgtKdd2paAwmEuQ== integrity sha512-/fLCHUdRqCLO9bDDve59yQlRXNd+7gXOeD6aO+IKOBz2KhIzSk7KRctSdM1jfv2E356QU/JmVL/+o0EfdWI33Q==
dependencies: dependencies:
classnames "^2.2.6" classnames "^2.2.6"
pbf "^3.2.1" pbf "^3.2.1"