combineIntoText exposed

This commit is contained in:
adueck 2023-07-27 21:39:06 +04:00
parent 6128dfa1d3
commit 742a1acf61
6 changed files with 202 additions and 240 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "pashto-inflector", "name": "pashto-inflector",
"version": "6.0.1", "version": "6.0.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pashto-inflector", "name": "pashto-inflector",
"version": "6.0.1", "version": "6.0.2",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "pashto-inflector", "name": "pashto-inflector",
"version": "6.0.1", "version": "6.0.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,12 +1,12 @@
{ {
"name": "@lingdocs/ps-react", "name": "@lingdocs/ps-react",
"version": "6.0.1", "version": "6.0.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lingdocs/ps-react", "name": "@lingdocs/ps-react",
"version": "6.0.1", "version": "6.0.2",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@formkit/auto-animate": "^1.0.0-beta.3", "@formkit/auto-animate": "^1.0.0-beta.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/ps-react", "name": "@lingdocs/ps-react",
"version": "6.0.1", "version": "6.0.2",
"description": "Pashto inflector library module with React components", "description": "Pashto inflector library module with React components",
"main": "dist/components/library.js", "main": "dist/components/library.js",
"module": "dist/components/library.js", "module": "dist/components/library.js",

View File

@ -6,162 +6,123 @@
* *
*/ */
import { import { conjugateVerb } from "./src/verb-conjugation";
conjugateVerb, import { inflectWord } from "./src/pashto-inflector";
} from "./src/verb-conjugation";
import { import {
inflectWord, getVerbInfo,
} from "./src/pashto-inflector"; getPassiveRootsAndStems,
import { getAbilityRootsAndStems,
getVerbInfo,
getPassiveRootsAndStems,
getAbilityRootsAndStems,
} from "./src/verb-info"; } from "./src/verb-info";
import { makeVPSelectionState } from "./src/phrase-building/verb-selection"; import { makeVPSelectionState } from "./src/phrase-building/verb-selection";
import { vpsReducer } from "./src/phrase-building/vps-reducer"; import { vpsReducer } from "./src/phrase-building/vps-reducer";
import { isPastTense } from "./src/phrase-building/vp-tools"; import { isPastTense } from "./src/phrase-building/vp-tools";
import { getInflectionPattern } from "./src/inflection-pattern";
import { makePsString, removeFVarients } from "./src/accent-and-ps-utils";
import { import {
getInflectionPattern, addToForm,
} from "./src/inflection-pattern"; concatPsString,
import { isVerbBlock,
makePsString, isImperativeBlock,
removeFVarients, isPluralInflectionSet,
} from "./src/accent-and-ps-utils"; isUnisexSet,
import { isInflectionSet,
addToForm, addEnglish,
concatPsString, endsWith,
isVerbBlock, hasBaParticle,
isImperativeBlock, psRemove,
isPluralInflectionSet, firstVariation,
isUnisexSet, psStringFromEntry,
isInflectionSet, getLong,
addEnglish, capitalizeFirstLetter,
endsWith, getLength,
hasBaParticle, psStringEquals,
psRemove,
firstVariation,
psStringFromEntry,
getLong,
capitalizeFirstLetter,
getLength,
psStringEquals,
} from "./src/p-text-helpers"; } from "./src/p-text-helpers";
import { joiningTails } from "./src/misc-text";
import { getEnglishWord } from "./src/get-english-word";
import { import {
joiningTails, standardizePashto,
} from "./src/misc-text"; standardizePhonetics,
import {
getEnglishWord,
} from "./src/get-english-word";
import {
standardizePashto,
standardizePhonetics,
} from "./src/standardize-pashto"; } from "./src/standardize-pashto";
import { phoneticsToDiacritics } from "./src/phonetics-to-diacritics"; import { phoneticsToDiacritics } from "./src/phonetics-to-diacritics";
import { import {
randomPerson, randomPerson,
isInvalidSubjObjCombo, isInvalidSubjObjCombo,
randomSubjObj, randomSubjObj,
getEnglishVerb, getEnglishVerb,
} from "./src/np-tools"; } from "./src/np-tools";
import { import {
getEnglishFromRendered, getEnglishFromRendered,
getPashtoFromRendered, getPashtoFromRendered,
} from "./src/phrase-building/np-tools"; // TODO should be one np-tools file? } from "./src/phrase-building/np-tools"; // TODO should be one np-tools file?
import { convertSpelling, revertSpelling } from "./src/convert-spelling";
import { import {
convertSpelling, dictionaryEntryBooleanFields,
revertSpelling, dictionaryEntryNumberFields,
} from "./src/convert-spelling"; dictionaryEntryTextFields,
import {
dictionaryEntryBooleanFields,
dictionaryEntryNumberFields,
dictionaryEntryTextFields,
} from "../types"; } from "../types";
import { validateEntry, standardizeEntry } from "./src/validate-entry";
import { import {
validateEntry, readDictionary,
standardizeEntry, writeDictionary,
} from "./src/validate-entry"; readDictionaryInfo,
import { writeDictionaryInfo,
readDictionary,
writeDictionary,
readDictionaryInfo,
writeDictionaryInfo,
} from "./src/protobuf"; } from "./src/protobuf";
import { pashtoConsonants } from "./src/pashto-consonants";
import { import {
pashtoConsonants, isNounAdjOrVerb,
} from "./src/pashto-consonants"; getEnglishPersonInfo,
import { getPersonFromVerbForm,
isNounAdjOrVerb, getPersonNumber,
getEnglishPersonInfo, personFromVerbBlockPos,
getPersonFromVerbForm, getVerbBlockPosFromPerson,
getPersonNumber, personIsPlural,
personFromVerbBlockPos, personGender,
getVerbBlockPosFromPerson, parseEc,
personIsPlural, personNumber,
personGender, randFromArray,
parseEc, chooseLength,
personNumber, isFirstPerson,
randFromArray, isSecondPerson,
chooseLength, isThirdPerson,
isFirstPerson, blank,
isSecondPerson, kidsBlank,
isThirdPerson, ensureNonComboVerbInfo,
blank, entryOfFull,
kidsBlank,
ensureNonComboVerbInfo,
entryOfFull,
} from "./src/misc-helpers"; } from "./src/misc-helpers";
import { simplifyPhonetics } from "./src/simplify-phonetics";
import { translatePhonetics } from "./src/translate-phonetics";
import { addDiacritics } from "./src/diacritics";
import { import {
simplifyPhonetics, removeAccents,
} from "./src/simplify-phonetics"; hasAccents,
import { splitUpSyllables,
translatePhonetics, countSyllables,
} from "./src/translate-phonetics";
import {
addDiacritics,
} from "./src/diacritics";
import {
removeAccents,
hasAccents,
splitUpSyllables,
countSyllables,
} from "./src/accent-helpers"; } from "./src/accent-helpers";
import { import {
makeNounSelection, makeNounSelection,
makeAdjectiveSelection, makeAdjectiveSelection,
makeAdverbSelection, makeAdverbSelection,
makeLocativeAdverbSelection, makeLocativeAdverbSelection,
makeParticipleSelection, makeParticipleSelection,
} from "./src/phrase-building/make-selections"; } from "./src/phrase-building/make-selections";
import { renderEP } from "./src/phrase-building/render-ep";
import { renderVP } from "./src/phrase-building/render-vp";
import { renderNPSelection } from "./src/phrase-building/render-np";
import { import {
renderEP, compileEP,
} from "./src/phrase-building/render-ep"; compileVP,
import { flattenLengths,
renderVP, combineIntoText,
} from "./src/phrase-building/render-vp";
import {
renderNPSelection,
} from "./src/phrase-building/render-np";
import {
compileEP,
compileVP,
flattenLengths,
} from "./src/phrase-building/compile"; } from "./src/phrase-building/compile";
import { isPashtoScript } from "./src/is-pashto";
import { renderAPSelection } from "./src/phrase-building/render-ap";
import { renderSandwich } from "./src/phrase-building/render-sandwich";
import { import {
isPashtoScript, humanReadableVerbForm,
} from "./src/is-pashto"; humanReadableEquativeTense,
import {
renderAPSelection,
} from "./src/phrase-building/render-ap";
import {
renderSandwich,
} from "./src/phrase-building/render-sandwich";
import {
humanReadableVerbForm,
humanReadableEquativeTense,
} from "./src/human-readable"; } from "./src/human-readable";
import { import { splitPsString } from "./src/splitPsString";
splitPsString,
} from "./src/splitPsString";
import shuffleArray from "./src/shuffle-array"; import shuffleArray from "./src/shuffle-array";
import defaultTextOptions from "./src/default-text-options"; import defaultTextOptions from "./src/default-text-options";
import * as grammarUnits from "./src/grammar-units"; import * as grammarUnits from "./src/grammar-units";
@ -170,108 +131,109 @@ import * as typePredicates from "./src/type-predicates";
import * as blockUtils from "./src/phrase-building/blocks-utils"; import * as blockUtils from "./src/phrase-building/blocks-utils";
export { export {
// FUNCTIONS // FUNCTIONS
conjugateVerb, conjugateVerb,
getVerbInfo, getVerbInfo,
getPassiveRootsAndStems, getPassiveRootsAndStems,
getAbilityRootsAndStems, getAbilityRootsAndStems,
inflectWord, inflectWord,
addToForm, addToForm,
concatPsString, concatPsString,
makePsString, makePsString,
removeFVarients, removeFVarients,
standardizePashto, standardizePashto,
standardizePhonetics, standardizePhonetics,
convertSpelling, convertSpelling,
revertSpelling, revertSpelling,
validateEntry, validateEntry,
standardizeEntry, standardizeEntry,
isNounAdjOrVerb, isNounAdjOrVerb,
simplifyPhonetics, simplifyPhonetics,
phoneticsToDiacritics, phoneticsToDiacritics,
addDiacritics, addDiacritics,
translatePhonetics, translatePhonetics,
getEnglishPersonInfo, getEnglishPersonInfo,
getPersonFromVerbForm, getPersonFromVerbForm,
getPersonNumber, getPersonNumber,
isVerbBlock, isVerbBlock,
isImperativeBlock, isImperativeBlock,
isInflectionSet, isInflectionSet,
isPluralInflectionSet, isPluralInflectionSet,
isUnisexSet, isUnisexSet,
personFromVerbBlockPos, personFromVerbBlockPos,
removeAccents, removeAccents,
hasAccents, hasAccents,
getEnglishWord, getEnglishWord,
getVerbBlockPosFromPerson, getVerbBlockPosFromPerson,
personIsPlural, personIsPlural,
personGender, personGender,
splitPsString, splitPsString,
addEnglish, addEnglish,
parseEc, parseEc,
endsWith, endsWith,
splitUpSyllables, splitUpSyllables,
countSyllables, countSyllables,
hasBaParticle, hasBaParticle,
psRemove, psRemove,
firstVariation, firstVariation,
capitalizeFirstLetter, capitalizeFirstLetter,
psStringFromEntry, psStringFromEntry,
getLong, getLong,
randomPerson, randomPerson,
isInvalidSubjObjCombo, isInvalidSubjObjCombo,
randomSubjObj, randomSubjObj,
shuffleArray, shuffleArray,
personNumber, personNumber,
makeNounSelection, makeNounSelection,
makeAdjectiveSelection, makeAdjectiveSelection,
makeAdverbSelection, makeAdverbSelection,
makeLocativeAdverbSelection, makeLocativeAdverbSelection,
makeParticipleSelection, makeParticipleSelection,
randFromArray, randFromArray,
renderSandwich, renderSandwich,
renderEP, renderEP,
renderVP, renderVP,
compileEP, compileEP,
compileVP, compileVP,
chooseLength, chooseLength,
flattenLengths, flattenLengths,
isFirstPerson, isFirstPerson,
isSecondPerson, isSecondPerson,
isThirdPerson, isThirdPerson,
isPastTense, isPastTense,
renderNPSelection, renderNPSelection,
getEnglishFromRendered, getEnglishFromRendered,
getPashtoFromRendered, getPashtoFromRendered,
renderAPSelection, renderAPSelection,
getEnglishVerb, getEnglishVerb,
humanReadableVerbForm, humanReadableVerbForm,
humanReadableEquativeTense, humanReadableEquativeTense,
ensureNonComboVerbInfo, ensureNonComboVerbInfo,
vpsReducer, vpsReducer,
makeVPSelectionState, makeVPSelectionState,
getLength, getLength,
psStringEquals, psStringEquals,
joiningTails, combineIntoText,
blockUtils, joiningTails,
blank, blockUtils,
kidsBlank, blank,
isPashtoScript, kidsBlank,
getInflectionPattern, isPashtoScript,
entryOfFull, getInflectionPattern,
// protobuf helpers entryOfFull,
readDictionary, // protobuf helpers
writeDictionary, readDictionary,
readDictionaryInfo, writeDictionary,
writeDictionaryInfo, readDictionaryInfo,
// OTHER writeDictionaryInfo,
typePredicates, // OTHER
grammarUnits, typePredicates,
pashtoConsonants, grammarUnits,
defaultTextOptions, pashtoConsonants,
dictionaryEntryTextFields, defaultTextOptions,
dictionaryEntryNumberFields, dictionaryEntryTextFields,
dictionaryEntryBooleanFields, dictionaryEntryNumberFields,
// TYPES dictionaryEntryBooleanFields,
Types, // TYPES
} Types,
};

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/inflect", "name": "@lingdocs/inflect",
"version": "6.0.1", "version": "6.0.2",
"description": "Pashto inflector library", "description": "Pashto inflector library",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/lib/library.d.ts", "types": "dist/lib/library.d.ts",