Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 2.0 (current version)Version 1.0

On this page

.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

  • id

    string, a unique identifier for the model, in a format author.bcp47.uniq. The components must be the same as the path of the model in the repository, e.g. a model in release/example/en.wordlist would have the identifer example.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.

  • name

    string, the human readable name of the model. This will usually differ from the id.

    Generation: from .kps info, package name.

  • authorName

    string, the name of the author.

    Generation: from .kps info, package author.

  • authorEmail

    string, the email address of the author

    Generation: from .kmp info, package author.

  • description

    string, 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

  • license

    string, all models in the repository must be mit license.

    Generation: from LICENSE.md

  • languages

    array 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.

  • lastModifiedDate

    string, the last time the model was modified, in RFC3339, UTC YYYY-MM-DDThh:mm:ss[.nnn]Z

    Generation: At compile time.

  • packageFilename

    string, 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.

  • packageFileSize

    number, size in bytes of the .kmp file that will be distributed.

    Generation: From .kmp.

  • jsFilename

    string, 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.

  • isRTL

    boolean, true if the script associated with the model is right-to-left.

    Generation: from .model.js, isRTL flag.

  • packageIncludes

    array, of strings. This flags whether a package includes:

    • "fonts" - one or more fonts

    This field corresponds to the .keyboard_info packageIncludes field, but is mostly unused.

    Generation: from .kmp

  • version

    string, the file version of the model / package.

    Generation: from .kmp.

  • minKeymanVersion

    string. 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.

  • helpLink

    string. If present, the link to this model's help page on help.keyman.com.

    Generation: from filename of model.

  • sourcePath

    string, the relative path of the keyboard in the /keymanapp/lexical-models GitHub repository, starting with release/, or experimental/.

    Generation: from path in repository.

  • related

    object, with each property an id of a lexical model and corresponding value is a ModelRelatedInfo.

    Generation: from .kmp

  • deprecated

    boolean, true if the model has been deprecated.

    Generation: Always generated from related models, currently only visible on api.keyman.com/model.

ModelRelatedInfo Object

  • deprecates

    boolean, 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.

  • deprecatedBy

    boolean, 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"
}