allow variations in pashto plural
This commit is contained in:
parent
30f6cad275
commit
da12c7f62b
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"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",
|
||||||
|
|
|
@ -984,6 +984,25 @@ const nouns: Array<{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// with variations on Pashto plural
|
||||||
|
{
|
||||||
|
in: {"ts":1527815268,"i":8475,"p":"شی","f":"shey","g":"shey","ppp":"شیان، شیونه", "ppf": "sheyáan, sheyóona","e":"thing","c":"n. m."},
|
||||||
|
out: {
|
||||||
|
inflections: {
|
||||||
|
masc: [
|
||||||
|
[{ p: "شی", f: "shey" }],
|
||||||
|
[{ p: "شي", f: "shee" }],
|
||||||
|
[{ p: "شیو", f: "shiyo" }, { p: "شو", f: "sho" }],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plural: {
|
||||||
|
masc: [
|
||||||
|
[{ p: "شیان", f: "sheyáan" }, { p: "شیونه", f: "sheyóona" }],
|
||||||
|
[{ p: "شیانو", f: "sheyáano" }, { p: "شیونو", f: "sheyóono" }],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
// TODO: Plaar plaroona paaraan - wrooNa
|
// TODO: Plaar plaroona paaraan - wrooNa
|
||||||
// Word with no inflections
|
// Word with no inflections
|
||||||
{
|
{
|
||||||
|
|
|
@ -373,9 +373,14 @@ function inflectRegularUyFem(p: string, f: string): T.Inflections {
|
||||||
|
|
||||||
function makePashtoPlural(word: T.DictionaryEntryNoFVars): T.PluralInflections | undefined {
|
function makePashtoPlural(word: T.DictionaryEntryNoFVars): T.PluralInflections | undefined {
|
||||||
if (!(word.ppp && word.ppf)) return undefined;
|
if (!(word.ppp && word.ppf)) return undefined;
|
||||||
const base = makePsString(word.ppp, word.ppf);
|
const base = splitPsByVarients(
|
||||||
|
makePsString(word.ppp, word.ppf)
|
||||||
|
);
|
||||||
function getBaseAndO(): T.PluralInflectionSet {
|
function getBaseAndO(): T.PluralInflectionSet {
|
||||||
return [[base], addOEnding(base)];
|
return [
|
||||||
|
base,
|
||||||
|
base.flatMap(addOEnding) as T.ArrayOneOrMore<T.PsString>,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
if (word.c?.includes("n. m.")) {
|
if (word.c?.includes("n. m.")) {
|
||||||
return { masc: getBaseAndO() };
|
return { masc: getBaseAndO() };
|
||||||
|
|
Loading…
Reference in New Issue