more
This commit is contained in:
parent
952bca1f80
commit
1f8011eb26
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/pashto-inflector",
|
||||
"version": "0.1.8",
|
||||
"version": "0.1.9",
|
||||
"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",
|
||||
|
|
|
@ -193,6 +193,19 @@ export function isSentenceForm(f: any): boolean {
|
|||
return Array.isArray(f) && "p" in f[0];
|
||||
}
|
||||
|
||||
export function isNounAdjOrVerb(entry: T.DictionaryEntry): "nounAdj" | "verb" | false {
|
||||
if (!entry.c) {
|
||||
return false;
|
||||
}
|
||||
if (entry.c.includes("adj.") || entry.c.includes("n. m.") || entry.c.includes("n. f.")) {
|
||||
return "nounAdj";
|
||||
}
|
||||
if (entry.c.slice(0, 3) === "v. ") {
|
||||
return "verb";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// not being used
|
||||
// export function isImperativeBlock(f: any): boolean {
|
||||
// function isPersonLine(g: any): boolean {
|
||||
|
|
|
@ -50,6 +50,12 @@ import {
|
|||
readDictionaryInfo,
|
||||
writeDictionaryInfo,
|
||||
} from "./lib/protobuf";
|
||||
import {
|
||||
pashtoConsonants,
|
||||
} from "./lib/pashto-consonants";
|
||||
import {
|
||||
isNounAdjOrVerb,
|
||||
} from "./lib/misc-helpers";
|
||||
import defaultTextOptions from "./lib/default-text-options";
|
||||
import * as grammarUnits from "./lib/grammar-units";
|
||||
import * as Types from "./types";
|
||||
|
@ -67,6 +73,7 @@ export {
|
|||
convertAfToPkSpelling,
|
||||
convertPkToAfSpelling,
|
||||
validateEntry,
|
||||
isNounAdjOrVerb,
|
||||
// protobuf helpers
|
||||
readDictionary,
|
||||
writeDictionary,
|
||||
|
@ -86,6 +93,7 @@ export {
|
|||
ButtonSelect,
|
||||
// OTHER
|
||||
grammarUnits,
|
||||
pashtoConsonants,
|
||||
defaultTextOptions,
|
||||
dictionaryEntryTextFields,
|
||||
dictionaryEntryNumberFields,
|
||||
|
|
Loading…
Reference in New Issue