regular english verbs ending in y like study
This commit is contained in:
parent
96b8ccf32c
commit
fe55a02f96
|
@ -48,7 +48,7 @@ function getFromTsS(entries) {
|
|||
const missingEc = [];
|
||||
const toReturn = allTsS.map(ts => {
|
||||
const entry = entries.find(x => ts === x.ts);
|
||||
if (!entry.ec) {
|
||||
if (!entry.ec && !entry.e.includes("to be ")) {
|
||||
missingEc.push(entry.ts);
|
||||
}
|
||||
if (!entry) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/pashto-inflector",
|
||||
"version": "0.5.6",
|
||||
"version": "0.5.7",
|
||||
"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",
|
||||
|
@ -66,7 +66,8 @@
|
|||
"eject": "react-scripts eject",
|
||||
"build-website": "node get-verbs.js && npm run build",
|
||||
"build-library": "node get-verbs.js && rimraf dist && rimraf dist-cjs && tsc --project library-tsconfig.json && node library-post-build.js && rollup -c",
|
||||
"test-ci": "npm run test -- --watchAll=false"
|
||||
"test-ci": "npm run test -- --watchAll=false",
|
||||
"get-verbs": "node get-verbs.js"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
test("parseEc should work", () => {
|
||||
expect(parseEc("walk")).toEqual(["walk", "walks", "walking", "walked", "walked"]);
|
||||
expect(parseEc("scare")).toEqual(["scare", "scares", "scaring", "scared", "scared"]);
|
||||
expect(parseEc("study")).toEqual(["study","studies","studying","studied","studied"]);
|
||||
expect(parseEc("sew,sews,sewing,sewed,sown")).toEqual(["sew", "sews", "sewing", "sewed", "sown"]);
|
||||
expect(parseEc(" sew, sews,sewing ,sewed, sown")).toEqual(["sew", "sews", "sewing", "sewed", "sown"]);
|
||||
});
|
|
@ -216,6 +216,10 @@ export function isNounAdjOrVerb(entry: T.DictionaryEntry): "nounAdj" | "verb" |
|
|||
*/
|
||||
export function parseEc(ec: string): T.EnglishVerbConjugationEc {
|
||||
function makeRegularConjugations(s: string): T.EnglishVerbConjugationEc {
|
||||
if (s.slice(-1) === "y") {
|
||||
const b = s.slice(0, -1);
|
||||
return [`${s}`, `${b}ies`, `${s}ing`, `${b}ied`, `${b}ied`];
|
||||
}
|
||||
const b = (s.slice(-1) === "e")
|
||||
? s.slice(0, -1)
|
||||
: s;
|
||||
|
|
Loading…
Reference in New Issue