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.


        start = {*:lexInfo}

        lexInfo={N?:  {tab:/n(I|\d{1,3})/, g?:gender, hAn?:one, h?:one, cnt?:/yes|no|both/ },
                 A?:  {tab:/[an](I|\d{1,3})/, hAn?:one, h?:one, pos?:/pre|post/},
                 Pro?:{tab:/pn\d{1,2}(-\d[sp]?[mfn]?)?|n27|n28|n75|n76|d[1345]|nI/, g?:gender, n?:num, pe?:oneTwoThree},
                 V?:  {tab:/v\d{1,3}/, aux?:/av|êt|aê/, h?:one, pat?:[/tdir|tind|intr|réfl|impe/]}, 
                 D?:  {tab:/d\d{1,2}(-\d)?|n(I|23|25|28|48|76)/, n?:num, value?:number},  
                 Adv?:{tab:/av|b\d/,h?:one}, 
                 P?:  {tab:/ppe?/,h?:one},
                 C?:  {tab:/cs|cc|cj|cje|cji/},
                 Pc?: {tab:[/pc\d{1,2}/], compl?:string},
                 basic?:boolean, 
                 value?:number
            }@(minProperties=1)
        
        one       = number@(minimum=1, maximum=1)
        oneTwoThree  = number@(minimum=1, maximum=3)
        gender = /m|f|n|x/
        num = /s|p/
    

Remarks

Query lexicon using jq