From 83ae0e3533d7015a554210cf2cb25599c491a4be Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 19 Jul 2022 15:44:13 -0500 Subject: [PATCH] better verb endings --- package.json | 2 +- src/lib/grammar-units.ts | 193 ++++++++++++++++++++++++++------------- 2 files changed, 131 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index 08837d7..20dee36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.4.0", + "version": "3.4.1", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/lib/grammar-units.ts b/src/lib/grammar-units.ts index be7e7ec..528399e 100644 --- a/src/lib/grammar-units.ts +++ b/src/lib/grammar-units.ts @@ -80,73 +80,140 @@ export const presentEndings: T.VerbBlock = [ ], ]; -export const pastEndings: T.VerbBlock = [ - [ - [{ - p: "م", - f: "um" - }], - [{ - p: "و", - f: "oo" - }] - ], - [ - [{ - p: "م", - f: "um" - }], - [{ - p: "و", - f: "oo" - }] - ], - [ - [{ - p: "ې", - f: "e" - }], - [{ - p: "ئ", - f: "eyy" - }] - ], - [ - [{ - p: "ې", - f: "e" - }], - [{ - p: "ئ", - f: "eyy" - }] - ], - [ - [{ - p: "ه", - f: "u" - }, - { +export const pastEndings: { + long: T.VerbBlock, + short: T.VerbBlock, +} = { + long: [ + [ + [{ + p: "م", + f: "um" + }], + [{ p: "و", - f: "o" - }, + f: "oo" + }] + ], + [ + [{ + p: "م", + f: "um" + }], + [{ + p: "و", + f: "oo" + }] + ], + [ + [{ + p: "ې", + f: "e" + }], + [{ + p: "ئ", + f: "eyy" + }] + ], + [ + [{ + p: "ې", + f: "e" + }], + [{ + p: "ئ", + f: "eyy" + }] + ], + [ + [{ + p: "و", + f: "o", + }], + [{ + p: "ل", + f: "ul" + }], + ], + [ + [{ + p: "ه", + f: "a" + }], + [{ + p: "ې", + f: "e" + }] ], - [{ - p: "ل", - f: "ul" - }], ], - [ - [{ - p: "ه", - f: "a" - }], - [{ - p: "ې", - f: "e" - }] + short: [ + [ + [{ + p: "م", + f: "um" + }], + [{ + p: "و", + f: "oo" + }] + ], + [ + [{ + p: "م", + f: "um" + }], + [{ + p: "و", + f: "oo" + }] + ], + [ + [{ + p: "ې", + f: "e" + }], + [{ + p: "ئ", + f: "eyy" + }] + ], + [ + [{ + p: "ې", + f: "e" + }], + [{ + p: "ئ", + f: "eyy" + }] + ], + [ + [{ + p: "ۀ", + f: "u" + }, + { + p: "و", + f: "o" + }, + ], + [{ + p: "ل", + f: "ul" + }], + ], + [ + [{ + p: "ه", + f: "a" + }], + [{ + p: "ې", + f: "e" + }] + ], ], -]; +}; // TODO: MAKE THIS VARIABLE FOR DIALECTS!