UNPKG

@zsnout/ithkuil

Version:

A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.

41 lines (40 loc) 1.6 kB
import type { Illocution } from "./illocution.js"; import type { Validation } from "./validation.js"; /** A non-ASR illocution or validation. */ export type IllocutionOrValidation = Exclude<Illocution, "ASR"> | Validation; /** An array containing all non-ASR illocutions and validations. */ export declare const ALL_ILLOCUTION_OR_VALIDATIONS: readonly ["DIR", "DEC", "IRG", "VRF", "ADM", "POT", "HOR", "CNJ", "OBS", "REC", "PUP", "RPR", "USP", "IMA", "CVN", "ITU", "INF"]; /** * An object mapping from illocutions and validations to their Ithkuilic * translations. */ export declare const ILLOCUTION_AND_VALIDATION_TO_ITHKUIL_MAP: { readonly OBS: "a"; readonly REC: "ä"; readonly PUP: "e"; readonly RPR: "i"; readonly USP: "ëi"; readonly IMA: "ö"; readonly CVN: "o"; readonly ITU: "ü"; readonly INF: "u"; readonly DIR: "ai"; readonly DEC: "au"; readonly IRG: "ei"; readonly VRF: "eu"; readonly ADM: "ou"; readonly POT: "oi"; readonly HOR: "iu"; readonly CNJ: "ui"; }; /** * Converts an illocution+validation pair into Ithkuil. * * @param illocutionOrValidation The illocution or validation to be converted. * Passing a validation implies ASR illocution. Consequently, ASR illocution * cannot be passed. * @param elideIfPossible Whether ASR+OBS illocution+validation can be elided. * @returns Romanized Ithkuilic text representing the illocution+validation * pair. */ export declare function illocutionAndValidationToIthkuil(illocutionOrValidation: IllocutionOrValidation, elideIfPossible: boolean): string;