Skip to content

Lexicon development

Wade Penistone edited this page Feb 10, 2019 · 9 revisions

Creating a lexicon

Prerequisites

You will need a functioning Mind Stack instance on your development machine, to confirm that you have a bot instance ready to attach the lexicon you are developing.

Also you will need a new git repo setup with the naming scheme being <lexicon-name>-lex
(eg salutation-lex)

Finally you will need some development knowledge or documentation of the lexicon you are planning to integrate with (if supported).

Boilerplate

You can generate boilerplate code for a lexicon by using the Official generator. This will be enough to get you started on writing your own code.

Configuration

Configuration in a lexicon is minimal as the functionality is heavily focus on code and how you want to proceed.

The only thing you have to configure is the languages/locales you plan to support. This can be done by editing the supported array in locale.json.

Data

Data

Code

Code

Tags (Skip if using generator)

Make sure to include the following tags (if your lexicon is public) under the keywords section of your package.json:

  • lexicon
  • lemme-lex

Example

"keywords": [
    "lexicon",
    "lemme-lex"
  ],