0.2.0 • Published 7 years ago

lexiko v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Lexiko

A flat-file dictionary generator

Why you probably shouldn't use this quite yet

This is still extremely early in development, and many aspects, such as the format of Lexeme files, may change. This means if you do end up building a sizeable lexicon with Lexiko, there's a chance you will need to completely re-do it. Feel free to try it out, and if you think it could be useful, please do provide feedback, but you should not depend on it until it's properly released.

Usage

First, ensure you have node.js and npm installed.

  1. run npm install -g lexiko is a console window.
  2. cd to your project directory. See setting up a project for more information.
  3. lexiko .
  4. Your generated files will be in the /output directory of your project.

Setting up a project

  1. Create a folder, name it whatever.
  2. Inside, create a file called language.json. It should contain the following:
{
    "langname": "Language Name Here"
}
  1. Create another folder called lexicon within your project folder.
  2. Start writing lexicon files, and save them inside the lexicon folder. See lexeme files(#lexeme files) for more information.

Lexeme files

In order to facilitate a simple system for creating lexicon entries, we use a custom format. It compiles to JSON during the building process, but JSON files will be removed. Please do not write in JSON directly.

(lexeme) (required)
pronounciation: /(ipa or another phonetic alphabet)/ (optional)

translations: (optional)

1. (category (noun, verb, etc.)) (required)
1. (first translation) (required)
1. (definition of the first translation) (optional)

2. (there can be as many of these as you'd like)

usage: (optional)

1. (first usage written in the language) (optional, but you cannot have a translation without an original language usage)
1. (translation of the first usage) (optional)

For an example, see the demo lexicon for French.

0.2.0

7 years ago

0.1.0

7 years ago