fix male plural issue, should been just ماماګان not ماماین

This commit is contained in:
adueck 2024-06-24 16:10:02 -04:00
parent b9cdc63258
commit 1a0e1922d8
7 changed files with 58 additions and 16 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "pashto-inflector", "name": "pashto-inflector",
"version": "7.1.3", "version": "7.1.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pashto-inflector", "name": "pashto-inflector",
"version": "7.1.3", "version": "7.1.4",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "pashto-inflector", "name": "pashto-inflector",
"version": "7.1.3", "version": "7.1.4",
"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",

View File

@ -1,12 +1,12 @@
{ {
"name": "@lingdocs/ps-react", "name": "@lingdocs/ps-react",
"version": "7.1.3", "version": "7.1.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lingdocs/ps-react", "name": "@lingdocs/ps-react",
"version": "7.1.3", "version": "7.1.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@formkit/auto-animate": "^1.0.0-beta.3", "@formkit/auto-animate": "^1.0.0-beta.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/ps-react", "name": "@lingdocs/ps-react",
"version": "7.1.3", "version": "7.1.4",
"description": "Pashto inflector library module with React components", "description": "Pashto inflector library module with React components",
"main": "dist/components/library.js", "main": "dist/components/library.js",
"module": "dist/components/library.js", "module": "dist/components/library.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/inflect", "name": "@lingdocs/inflect",
"version": "7.1.3", "version": "7.1.4",
"description": "Pashto inflector library", "description": "Pashto inflector library",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/lib/library.d.ts", "types": "dist/lib/library.d.ts",

View File

@ -850,15 +850,38 @@ const nouns: {
}, },
}, },
}, },
// masculine ending in a vowel // masculine ending in a vowe
{
in: {
ts: 1527816446,
i: 12568,
p: "کاکا",
f: "kaakáa",
g: "kaakaa",
e: "paternal uncle, term of address for elderly man",
r: 4,
c: "n. m. anim.",
a: 1,
},
out: {
plural: {
masc: [
[{ p: "کاکاګان", f: "kaakaagáan" }],
[{ p: "کاکاګانو", f: "kaakaagáano" }],
],
},
},
},
{ {
in: { in: {
ts: 1527815484, ts: 1527815484,
i: 13069, i: 13069,
p: "ملا", p: "ملا",
f: "mUllaa", f: "mUláa",
g: "mUllaa", g: "mUláa",
e: "mullah, priest", e: "mullah, priest",
ppp: "ملایان",
ppf: "mUlaayáan",
r: 4, r: 4,
c: "n. m.", c: "n. m.",
}, },
@ -866,12 +889,12 @@ const nouns: {
plural: { plural: {
masc: [ masc: [
[ [
{ p: "ملایان", f: "mUllaayáan" }, { p: "ملایان", f: "mUlaayáan" },
{ p: "ملاګان", f: "mUllaagáan" }, { p: "ملاګان", f: "mUlaagáan" },
], ],
[ [
{ p: "ملایانو", f: "mUllaayáano" }, { p: "ملایانو", f: "mUlaayáano" },
{ p: "ملاګانو", f: "mUllaagáano" }, { p: "ملاګانو", f: "mUlaagáano" },
], ],
], ],
}, },

View File

@ -541,6 +541,23 @@ function makePlural(
if (w.c.includes("n. m.")) return { plural: { masc: plural } }; if (w.c.includes("n. m.")) return { plural: { masc: plural } };
if (w.c.includes("n. f.")) return { plural: { fem: plural } }; if (w.c.includes("n. f.")) return { plural: { fem: plural } };
} }
// exception for mUláa
if (w.f === "mUláa" || w.f === "mUlaa") {
return {
plural: {
masc: [
[
{ p: "ملایان", f: "mUlaayáan" },
{ p: "ملاګان", f: "mUlaagáan" },
],
[
{ p: "ملایانو", f: "mUlaayáano" },
{ p: "ملاګانو", f: "mUlaagáano" },
],
],
},
};
}
const arabicPlural = makeArabicPlural(w); const arabicPlural = makeArabicPlural(w);
const pashtoPlural = makePashtoPlural(w); const pashtoPlural = makePashtoPlural(w);
const bundledPlural = makeBundledPlural(w); const bundledPlural = makeBundledPlural(w);
@ -619,6 +636,8 @@ function makePlural(
}; };
} }
function addLongVowelSuffix(gender: "masc" | "fem"): T.PluralInflectionSet { function addLongVowelSuffix(gender: "masc" | "fem"): T.PluralInflectionSet {
if (pashtoPlural) {
}
const base = removeEndTick(makePsString(w.p, w.f)); const base = removeEndTick(makePsString(w.p, w.f));
const baseWOutAccents = removeAccents(base); const baseWOutAccents = removeAccents(base);
const space = const space =
@ -630,7 +649,6 @@ function makePlural(
]); ]);
} else { } else {
return addSecondInf([ return addSecondInf([
concatPsString(baseWOutAccents, space, { p: "یان", f: "yáan" }),
concatPsString(baseWOutAccents, space, { p: "ګان", f: "gáan" }), concatPsString(baseWOutAccents, space, { p: "ګان", f: "gáan" }),
]); ]);
} }
@ -663,11 +681,12 @@ function makePlural(
: w.c?.includes("n. f.") : w.c?.includes("n. f.")
? "fem noun" ? "fem noun"
: "other"; : "other";
if (pashtoPlural) if (pashtoPlural) {
return { return {
plural: pashtoPlural, plural: pashtoPlural,
arabicPlural, arabicPlural,
}; };
}
if (type === "unisex noun") { if (type === "unisex noun") {
// doesn't need to be labelled anim - because it's only with animate nouns that you get the unisex - I THINK // doesn't need to be labelled anim - because it's only with animate nouns that you get the unisex - I THINK
if (endsInConsonant(w) && !w.infap) { if (endsInConsonant(w) && !w.infap) {