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/
string
associated with the tab
key must be a declension or conjugation table number in rule-en.js
and rule-fr.js
. g
) and number (n
) can only take a limited set of values;value
is the numerical value associated either with a cardinal or an ordinal number respectively;tdir
: transitive directtind
: intransitive directintr
: intransitiveréfl
: reflexiveimpe
: impersonalréfl
, then it means that the verb is essentiellement réfléchi and thus it is always preceded by a reflexive pronoun when it is conjugated.
h
is 1 for the French h aspiré in which case no elision will take place between this word and the preceding one;hAn
is 1, this word changes a preceding a to an; cnt
indicates if an English noun is countable: yes
, no
or both
.punct
, compl
is the complementary punctuation sign, e.g. matching closing parenthesis or bracket.basic
indicates that this entry is a common word in either French or Englishjq
love
jq 'to_entries|.[]|select(.key=="love")' lexicon-en.json
love
, -c
for a more compact outputjq -c 'to_entries|.[]|select(.key|test("^love.*"))' lexicon-en.json
er
that can be used either as a noun, a verb or an adjective, but show only the entry; -r
to show the entries without surrounding quotesjq -r 'to_entries|.[]|select((.key|test("er$")) and (.value|has("N")) and (.value|has("V")) and (.value|has("A")))|.key' lexicon-en.json