rename to getInflectionPattern

This commit is contained in:
lingdocs 2022-09-12 19:13:59 +04:00
parent cc2e5fe0bc
commit fcfbf77872
4 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/pashto-inflector", "name": "@lingdocs/pashto-inflector",
"version": "3.9.1", "version": "3.9.2",
"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",

View File

@ -1,4 +1,4 @@
import { AdjectiveEntry, InflectionCategory, NounEntry } from "../types"; import { AdjectiveEntry, InflectionPattern, NounEntry } from "../types";
import { import {
isFemNounEntry, isFemNounEntry,
isNounEntry, isNounEntry,
@ -10,18 +10,18 @@ import {
isPattern6FemEntry, isPattern6FemEntry,
} from "./type-predicates"; } from "./type-predicates";
export function getInflectionCategory(e: NounEntry | AdjectiveEntry): InflectionCategory { export function getInflectionPattern(e: NounEntry | AdjectiveEntry): InflectionPattern {
return isPattern1Entry(e) return isPattern1Entry(e)
? InflectionCategory.Basic ? InflectionPattern.Basic
: isPattern2Entry(e) : isPattern2Entry(e)
? InflectionCategory.UnstressedEy ? InflectionPattern.UnstressedEy
: isPattern3Entry(e) : isPattern3Entry(e)
? InflectionCategory.StressedEy ? InflectionPattern.StressedEy
: isPattern4Entry(e) : isPattern4Entry(e)
? InflectionCategory.Pashtun ? InflectionPattern.Pashtun
: isPattern5Entry(e) : isPattern5Entry(e)
? InflectionCategory.Squish ? InflectionPattern.Squish
: isNounEntry(e) && isFemNounEntry(e) && isPattern6FemEntry(e) : isNounEntry(e) && isFemNounEntry(e) && isPattern6FemEntry(e)
? InflectionCategory.FemInanEe ? InflectionPattern.FemInanEe
: InflectionCategory.None; : InflectionPattern.None;
} }

View File

@ -39,7 +39,7 @@ import Block, { NPBlock, APBlock } from "./components/blocks/Block";
import { roleIcon } from "./components/vp-explorer/VPExplorerExplanationModal"; import { roleIcon } from "./components/vp-explorer/VPExplorerExplanationModal";
import CompiledPTextDisplay from "./components/CompiledPTextDisplay"; import CompiledPTextDisplay from "./components/CompiledPTextDisplay";
import RenderedBlocksDisplay from "./components/RenderedBlocksDisplay"; import RenderedBlocksDisplay from "./components/RenderedBlocksDisplay";
import { getInflectionCategory } from "./lib/inflection-category"; import { getInflectionPattern } from "./lib/inflection-category";
import { import {
makePsString, makePsString,
removeFVarients, removeFVarients,
@ -262,7 +262,7 @@ export {
blank, blank,
kidsBlank, kidsBlank,
isPashtoScript, isPashtoScript,
getInflectionCategory, getInflectionPattern,
// protobuf helpers // protobuf helpers
readDictionary, readDictionary,
writeDictionary, writeDictionary,

View File

@ -500,7 +500,7 @@ export type VerbEntry = {
complement?: DictionaryEntry, complement?: DictionaryEntry,
}; };
export enum InflectionCategory { export enum InflectionPattern {
None = 0, None = 0,
Basic = 1, Basic = 1,
UnstressedEy = 2, UnstressedEy = 2,