@predictive-text-studio/lexical-model-compiler
Version:
Keyman Developer lexical model compiler
29 lines (28 loc) • 1.45 kB
TypeScript
/**
* Merges a source .model_info file with metadata extracted from .kps file and
* compiled files to produce a comprehensive .model_info file.
*/
/// <reference path="../lexical-model-compiler/model-info-file.d.ts" />
export declare class ModelInfoOptions {
/** The identifier for the model */
model_id: string;
/** The data from the .kps file, transformed to kmp.json */
kmpJsonData: KmpJsonFile;
/** The path in the keymanapp/lexical-models repo where this model may be found (optional) */
sourcePath?: string;
/** The compiled model filename and relative path (.js) */
modelFileName: string;
/** The compiled package filename and relative path (.kmp) */
kmpFileName: string;
}
/**
* Merges source .model_info file with metadata from the model and package source file.
* This function is intended for use within the lexical-models repository. While many of the
* parameters could be deduced from each other, they are specified here to reduce the
* number of places the filenames are constructed.
*
* @param sourceModelInfoFileName Path for the source .model_info file
* @param destModelInfoFileName Path to write the merged .model_info file to
* @param options Details on files from which to extract additional metadata
*/
export declare function writeMergedModelMetadataFile(sourceModelInfoFileName: string, destModelInfoFileName: string, options: ModelInfoOptions): void;