logicaffeine_lexicon/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![warn(missing_docs)]
3#![doc = include_str!("../README.md")]
4
5/// Lexicon type definitions for grammatical and semantic categories.
6pub mod types;
7pub use types::*;
8
9/// The vocabulary database: every keyword, pronoun, noun, verb, adjective, multi-word expression,
10/// ontology relation and axiom the Logic-mode pipeline knows, as the JSON document this crate owns.
11///
12/// `logicaffeine-language` compiles it into lookup tables at build time (it is a build-dependency
13/// of that crate), and the `dynamic-lexicon` [`runtime`] module parses it at run time.
14pub const LEXICON_JSON: &str = include_str!("../assets/lexicon.json");
15
16/// Runtime JSON-based lexicon loading (requires `dynamic-lexicon` feature).
17///
18/// This module provides dynamic lexicon loading as an alternative to compile-time
19/// code generation. It defines its own entry types (`runtime::VerbEntry`, etc.)
20/// for JSON deserialization, distinct from the compile-time types in [`types`].
21#[cfg(feature = "dynamic-lexicon")]
22#[cfg_attr(docsrs, doc(cfg(feature = "dynamic-lexicon")))]
23pub mod runtime;