.model_info 2.0 Specification
This file is generated by the compiler and provides metadata for a lexical model. It is a JSON file, with the following members. The .model_info file will be used primarily by Keyman Cloud Services. During CI deployment, it will be built from the source package and lexical model metadata, and pushed with the compiled resources to the download store.
ModelInfo Object
-
idstring, a unique identifier for the model, in a formatauthor.bcp47.uniq. The components must be the same as the path of the model in the repository, e.g. a model inrelease/example/en.wordlistwould have the identiferexample.en.wordlist. The identifier must be lowercase and each component must be a valid Javascript identifier, thus the BCP 47 component should be delineated with underscores (_), not hyphens (-).Example:
"id": "example.en_us.wordlist"Generation: from parent folder name.
-
namestring, the human readable name of the model. This will usually differ from the id.Generation: from .kps info, package name.
-
authorNamestring, the name of the author.Generation: from .kps info, package author.
-
authorEmailstring, the email address of the authorGeneration: from .kmp info, package author.
-
descriptionstring, a textual description of the model suitable for displaying in a catalog online. This may contain some minimal HTML (p, b, i, u, span, a, ul, ol, li, br, hr, h1-h4 tags).Generation: from .kmp info
-
licensestring, all models in the repository must bemitlicense.Generation: from LICENSE.md
-
languagesarray of strings; an array of BCP 47 codes, used as an exact (case-insensitive) match of BCP 47 codes for languages that the model supports.
Generation: From .kmp info.
-
lastModifiedDatestring, the last time the model was modified, in RFC3339, UTCYYYY-MM-DDThh:mm:ss[.nnn]ZGeneration: At compile time.
-
packageFilenamestring, filename of the .kmp file that will be distributed, e.g."nrc.en.mtnt.model.kmp", or in api.keyman.com/model results, a URL from which the file may be downloaded, e.g."https://keyman.com/go/package/download/model/nrc.en.mtnt?version=0.3.3&update=1".Generation: always
author.bcp47.uniq.model.kmp. -
packageFileSizenumber, size in bytes of the .kmp file that will be distributed.Generation: From .kmp.
-
jsFilenamestring, filename of the .js file that will be distributed, e.g."nrc.e.mtnt.model.js", or in api.keyman.com/model results, a URL from which the file may be downloaded, e.g."https://downloads.keyman.com/models/nrc.en.mtnt/0.3.3/nrc.en.mtnt.model.js".Generation: always
author.bcp47.uniq.model.js. -
isRTLboolean, true if the script associated with the model is right-to-left.Generation: from .model.js,
isRTLflag. -
packageIncludesarray, ofstrings. This flags whether a package includes:"fonts"- one or more fonts
This field corresponds to the .keyboard_info
packageIncludesfield, but is mostly unused.Generation: from .kmp
-
versionstring, the file version of the model / package.Generation: from .kmp.
-
minKeymanVersionstring. The minimum version of Keyman that can read this model. If present, must be a two part version string, starting from"12.0"and up.Generation: from .kmp, .js.
-
helpLinkstring. If present, the link to this model's help page on help.keyman.com.Generation: from filename of model.
-
sourcePathstring, the relative path of the keyboard in the /keymanapp/lexical-models GitHub repository, starting withrelease/, orexperimental/.Generation: from path in repository.
-
relatedobject, with each property an id of a lexical model and corresponding value is a ModelRelatedInfo.
Generation: from .kmp
-
deprecatedboolean, true if the model has been deprecated.Generation: Always generated from related models, currently only visible on api.keyman.com/model.
ModelRelatedInfo Object
-
deprecatesboolean, if true, then this model is intended to deprecate another model with the parent member name, and Keyman will upgrade it to this model if found, ignoring version numbers. -
deprecatedByboolean, if true, then this model has been deprecated by the keyboard referred to. This member will be returned only from queries to api.keyman.com.
Schema
A validating schema for the object is online at https://api.keyman.com/schemas/model_info/2.0/model_info.schema.json
Generation
The kmc compiler generates the .model_info file from the package and lexical model metadata, into the build/ folder.
Examples
The following is a comprehensive example .model_info file for an example lexical model.
{
"languages": [
"byn-Ethi"
],
"id": "gff.byn.gff_blin",
"name": "GFF Blin Lexical Model",
"license": "mit",
"authorName": "Geʾez Frontier Foundation",
"authorEmail": "yacob@geez.org",
"description": "<p>Blin Lexical Model derived from a curated document corpus.</p>",
"lastModifiedDate": "2024-09-16T01:05:45.000Z",
"packageFilename": "gff.byn.gff_blin.model.kmp",
"packageFileSize": 484102,
"jsFilename": "gff.byn.gff_blin.model.js",
"jsFileSize": 4104550,
"packageIncludes": [],
"version": "1.0.2",
"minKeymanVersion": "12.0",
"helpLink": "https://help.keyman.com/model/gff.byn.gff_blin",
"sourcePath": "release/gff/gff.byn.gff_blin"
}


