0.2.0 • Published 7 years ago
lexiko v0.2.0
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.
- run
npm install -g lexiko
is a console window. cd
to your project directory. See setting up a project for more information.lexiko .
- Your generated files will be in the /output directory of your project.
Setting up a project
- Create a folder, name it whatever.
- Inside, create a file called
language.json
. It should contain the following:
{
"langname": "Language Name Here"
}
- Create another folder called
lexicon
within your project folder. - 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.