Format of a jsRealB lexicon

The JSON format of the lexicons of jsRealB is derived from an internal format Lisp inspired format developed at RALI many years ago. These lexicons were originally created using a Python script from the original version and then manually patched.

The declension or conjugation information is associated with tables that in principle should cover most English and French use cases. They a defined in the files rule-en.js and rule-fr.js.

We now give the json-rnc format used to validate the entries. It is an object with whose keys are lemma for which the value is itself an object (of type lexInfo) whose key is a part of speech and the value is the declension or conjugation information. All keys in a lexInfo are optional but there must be at least one present.


## validation of jsRealB dictionary lexical information
start = {*:lexInfo}

lexInfo={N?:  noun,
         A?:  adjective,
         Pro?:pronoun,
         V?:  verb, 
         D?:  determiner, 
         Adv?:other, 
         P?:  other,
         C?:  other,
         Pc?: punct,
         basic?:boolean
    }@(minProperties=1)

noun      = {tab:[string], g?:string,     hAn?:one, h?:one }
adjective = {tab:[string], hAn?:number,   h?:one,   pos?:/pre|post/, value?:number}
pronoun   = {tab:[string], g?:/m|f|n|x/, n?:/s|p/, pe?:oneTwoThree}
verb      = {tab:string,   aux?:[string], h?:one}
determiner= {tab:[string], n?:/s|p/,      value?:number}
other     = {tab:[string], h?:one}
one       = number@(minimum=1, maximum=1)
oneTwoThree  = number@(minimum=1, maximum=3)
punct     = {tab:[string], compl?:string}
    

Remarks