// Package lexicon serves offline word lookups — a definition and a list of // synonyms for a single word — from two public-domain datasets compiled into the // binary. Definitions come from the Wordset dictionary (modern, concise glosses // with a part of speech and example, which read kindly for an ESL writer); // synonyms come from the Moby Thesaurus. Both are gzipped JSON, decompressed // lazily on first use so a writer who never right-clicks a word pays nothing. package lexicon import _ "embed" // definitionsGz is the gzipped Wordset definitions map: word → [[pos, def, // example], …], lowercase keys. Built by the data-prep step (see commit notes). // //go:embed data/definitions.json.gz var definitionsGz []byte // synonymsGz is the gzipped Moby thesaurus map: headword → [synonym, …], // lowercase keys, capped per word to keep the popover (and the binary) small. // //go:embed data/synonyms.json.gz var synonymsGz []byte