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",
"version": "7.1.3",
"version": "7.1.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pashto-inflector",
"version": "7.1.3",
"version": "7.1.4",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/inflect",
"version": "7.1.3",
"version": "7.1.4",
"description": "Pashto inflector library",
"main": "dist/index.js",
"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: {
ts: 1527815484,
i: 13069,
p: "ملا",
f: "mUllaa",
g: "mUllaa",
f: "mUláa",
g: "mUláa",
e: "mullah, priest",
ppp: "ملایان",
ppf: "mUlaayáan",
r: 4,
c: "n. m.",
},
@ -866,12 +889,12 @@ const nouns: {
plural: {
masc: [
[
{ p: "ملایان", f: "mUllaayáan" },
{ p: "ملاګان", f: "mUllaagáan" },
{ p: "ملایان", f: "mUlaayáan" },
{ p: "ملاګان", f: "mUlaagáan" },
],
[
{ p: "ملایانو", f: "mUllaayáano" },
{ p: "ملاګانو", f: "mUllaagáano" },
{ p: "ملایانو", f: "mUlaayá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. 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 pashtoPlural = makePashtoPlural(w);
const bundledPlural = makeBundledPlural(w);
@ -619,6 +636,8 @@ function makePlural(
};
}
function addLongVowelSuffix(gender: "masc" | "fem"): T.PluralInflectionSet {
if (pashtoPlural) {
}
const base = removeEndTick(makePsString(w.p, w.f));
const baseWOutAccents = removeAccents(base);
const space =
@ -630,7 +649,6 @@ function makePlural(
]);
} else {
return addSecondInf([
concatPsString(baseWOutAccents, space, { p: "یان", f: "yáan" }),
concatPsString(baseWOutAccents, space, { p: "ګان", f: "gáan" }),
]);
}
@ -663,11 +681,12 @@ function makePlural(
: w.c?.includes("n. f.")
? "fem noun"
: "other";
if (pashtoPlural)
if (pashtoPlural) {
return {
plural: pashtoPlural,
arabicPlural,
};
}
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
if (endsInConsonant(w) && !w.infap) {