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