also inflect numbers
This commit is contained in:
parent
cc8e688ab7
commit
ddcc8011cc
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "1.1.5",
|
"version": "1.1.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",
|
||||||
|
|
|
@ -202,6 +202,24 @@ const adjectives: Array<{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// numbers should inflect just like adjectives
|
||||||
|
{
|
||||||
|
in: {"ts":1588688995113,"i":8176,"p":"شپږ","f":"shpuG","g":"shpug","e":"six","c":"num."},
|
||||||
|
out: {
|
||||||
|
inflections: {
|
||||||
|
masc: [
|
||||||
|
[{ p: "شپږ", f: "shpuG" }],
|
||||||
|
[{ p: "شپږ", f: "shpuG" }],
|
||||||
|
[{ p: "شپږو", f: "shpuGo" }],
|
||||||
|
],
|
||||||
|
fem: [
|
||||||
|
[{ p: "شپږه", f: "shpuGa" }],
|
||||||
|
[{ p: "شپږې", f: "shpuGe" }],
|
||||||
|
[{ p: "شپږو", f: "shpuGo" }],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
// without accents
|
// without accents
|
||||||
{
|
{
|
||||||
in: {"ts":1527812796,"i":8574,"p":"ښه","f":"xu","g":"xu","e":"good","c":"adj."},
|
in: {"ts":1527812796,"i":8574,"p":"ښه","f":"xu","g":"xu","e":"good","c":"adj."},
|
||||||
|
|
|
@ -51,7 +51,7 @@ export function inflectWord(word: T.DictionaryEntry): T.InflectorOutput {
|
||||||
if (w.c && w.c.includes("pl.")) {
|
if (w.c && w.c.includes("pl.")) {
|
||||||
return handlePluralNoun(w);
|
return handlePluralNoun(w);
|
||||||
}
|
}
|
||||||
if (w.c && (w.c.includes("adj.") || w.c.includes("unisex"))) {
|
if (w.c && (w.c.includes("adj.") || w.c.includes("unisex") || w.c.includes("num"))) {
|
||||||
return handleUnisexWord(w);
|
return handleUnisexWord(w);
|
||||||
}
|
}
|
||||||
if (w.c && (w.c.includes("n. m."))) {
|
if (w.c && (w.c.includes("n. m."))) {
|
||||||
|
|
Loading…
Reference in New Issue