From 904f6fa8d8d61e9ee453509a2dac8a436026f536 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Wed, 7 Jul 2021 16:01:55 +0300 Subject: [PATCH] more --- get-verbs.js | 2 +- package.json | 2 +- src/lib/misc-helpers.test.ts | 2 ++ src/lib/misc-helpers.ts | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/get-verbs.js b/get-verbs.js index 1c9cc6b..992ae09 100644 --- a/get-verbs.js +++ b/get-verbs.js @@ -47,7 +47,7 @@ function getFromTsS(entries) { const missingEc = []; const toReturn = allTsS.map(ts => { const entry = entries.find(x => ts === x.ts); - if (!entry.ec && !entry.e.includes("to be ")) { + if (!entry.ec) { missingEc.push(entry.ts); } if (!entry) { diff --git a/package.json b/package.json index e5256f5..ffce99f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "0.6.4", + "version": "0.6.5", "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/misc-helpers.test.ts b/src/lib/misc-helpers.test.ts index 280a741..73119f6 100644 --- a/src/lib/misc-helpers.test.ts +++ b/src/lib/misc-helpers.test.ts @@ -18,11 +18,13 @@ test("parseEc should work", () => { expect(parseEc("marry")).toEqual(["marry","marries","marrying","married","married"]); expect(parseEc("get")).toEqual(["get","gets","getting","got","gotten"]); expect(parseEc("become")).toEqual(["become","becomes","becoming","became","become"]); + expect(parseEc("be")).toEqual(["am","is","being","was","have been"]); expect(parseEc("make")).toEqual(["make","makes","making","made","made"]); expect(parseEc("have")).toEqual(["have","has","having","had","had"]); expect(parseEc("die")).toEqual(["die", "dies", "dying", "died", "died"]); expect(parseEc("stray")).toEqual(["stray","strays","straying","strayed","strayed"]); expect(parseEc("cross")).toEqual(["cross","crosses","crossing","crossed","crossed"]); + expect(parseEc("raise")).toEqual(["raise","raises","raising","raised","raised"]); expect(parseEc("play")).toEqual(["play","plays","playing","played","played"]); // if there are only four items the perfect will be the same as the simple past expect(parseEc("think,thinks,thinking,thought")).toEqual(["think","thinks","thinking","thought","thought"]); diff --git a/src/lib/misc-helpers.ts b/src/lib/misc-helpers.ts index 8ddcb03..43faefb 100644 --- a/src/lib/misc-helpers.ts +++ b/src/lib/misc-helpers.ts @@ -231,6 +231,9 @@ export function parseEc(ec: string): T.EnglishVerbConjugationEc { if (s === "have") { return ["have","has","having","had","had"]; } + if (s === "be") { + return ["am","is","being","was","have been"]; + } if ((s.slice(-1) === "y") && !isVowel(s.slice(-2)[0])) { const b = s.slice(0, -1); return [`${s}`, `${b}ies`, `${s}ing`, `${b}ied`, `${b}ied`];