pub struct LexiconSchema;Expand description
Interface to the jbovlaste arity dictionary (delegates to nibli_lexicon).
Implementations§
Source§impl LexiconSchema
impl LexiconSchema
Sourcepub fn get_arity(word: &str) -> Option<usize>
pub fn get_arity(word: &str) -> Option<usize>
Retrieves the arity of a predicate. The canonical relation names in the
IR are ENGLISH corpus names (or compound relation idents);
nibli_lexicon::get_arity resolves them directly. Returns None for
unknown words — gismu spellings never resolve (provenance only).
Sourcepub fn get_arity_or_default(word: &str) -> usize
pub fn get_arity_or_default(word: &str) -> usize
Retrieves the arity, defaulting to 2 for unknown words. Use this only when a fallback is acceptable (an unknown relation).
Sourcepub fn injected_arity(relation: &str, provided: usize) -> Result<usize, String>
pub fn injected_arity(relation: &str, provided: usize) -> Result<usize, String>
Arity policy for PROGRAMMATICALLY injected facts (the :assert /
WIT assert-fact / RDF-import seam — and the NIBLI_KR §14.1 hook
where an injectable schema registry will eventually sit): a KNOWN
relation uses its corpus arity, failing closed on over-arity
(mirroring the text path’s reject — never a silent truncation); an
UNKNOWN relation trusts the caller’s argument count as ground truth
(no arity-2 guess).