more
This commit is contained in:
parent
b5fba5a54a
commit
904f6fa8d8
|
@ -47,7 +47,7 @@ function getFromTsS(entries) {
|
||||||
const missingEc = [];
|
const missingEc = [];
|
||||||
const toReturn = allTsS.map(ts => {
|
const toReturn = allTsS.map(ts => {
|
||||||
const entry = entries.find(x => ts === x.ts);
|
const entry = entries.find(x => ts === x.ts);
|
||||||
if (!entry.ec && !entry.e.includes("to be ")) {
|
if (!entry.ec) {
|
||||||
missingEc.push(entry.ts);
|
missingEc.push(entry.ts);
|
||||||
}
|
}
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "0.6.4",
|
"version": "0.6.5",
|
||||||
"author": "lingdocs.com",
|
"author": "lingdocs.com",
|
||||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||||
"homepage": "https://verbs.lingdocs.com",
|
"homepage": "https://verbs.lingdocs.com",
|
||||||
|
|
|
@ -18,11 +18,13 @@ test("parseEc should work", () => {
|
||||||
expect(parseEc("marry")).toEqual(["marry","marries","marrying","married","married"]);
|
expect(parseEc("marry")).toEqual(["marry","marries","marrying","married","married"]);
|
||||||
expect(parseEc("get")).toEqual(["get","gets","getting","got","gotten"]);
|
expect(parseEc("get")).toEqual(["get","gets","getting","got","gotten"]);
|
||||||
expect(parseEc("become")).toEqual(["become","becomes","becoming","became","become"]);
|
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("make")).toEqual(["make","makes","making","made","made"]);
|
||||||
expect(parseEc("have")).toEqual(["have","has","having","had","had"]);
|
expect(parseEc("have")).toEqual(["have","has","having","had","had"]);
|
||||||
expect(parseEc("die")).toEqual(["die", "dies", "dying", "died", "died"]);
|
expect(parseEc("die")).toEqual(["die", "dies", "dying", "died", "died"]);
|
||||||
expect(parseEc("stray")).toEqual(["stray","strays","straying","strayed","strayed"]);
|
expect(parseEc("stray")).toEqual(["stray","strays","straying","strayed","strayed"]);
|
||||||
expect(parseEc("cross")).toEqual(["cross","crosses","crossing","crossed","crossed"]);
|
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"]);
|
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
|
// 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"]);
|
expect(parseEc("think,thinks,thinking,thought")).toEqual(["think","thinks","thinking","thought","thought"]);
|
||||||
|
|
|
@ -231,6 +231,9 @@ export function parseEc(ec: string): T.EnglishVerbConjugationEc {
|
||||||
if (s === "have") {
|
if (s === "have") {
|
||||||
return ["have","has","having","had","had"];
|
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])) {
|
if ((s.slice(-1) === "y") && !isVowel(s.slice(-2)[0])) {
|
||||||
const b = s.slice(0, -1);
|
const b = s.slice(0, -1);
|
||||||
return [`${s}`, `${b}ies`, `${s}ing`, `${b}ied`, `${b}ied`];
|
return [`${s}`, `${b}ies`, `${s}ing`, `${b}ied`, `${b}ied`];
|
||||||
|
|
Loading…
Reference in New Issue