The upper ontology: every KB file under resources/kb/upper/, loaded into CxUniverse.
core.txt is the vocabulary — the special-predicate surface the engine interprets
(types/contexts, arg, disjoint, the set/*Rule wrappers, the predicate metadata,
negation, ist, the evaluables), the predicate meta-ontology and the top of the
ontology — and each other file is one domain (abstract, life, measure, organism,
reflection, society, space, time). Documentation rides on comment sentexes,
(comment <term> "...") — ordinary sentexes (stored, indexed, queryable) — so the
KB documents itself in its own representation.
CxUniverse is the root: every context the middle layer wires in sees it, and a KB built for vocabulary alone holds exactly this load. The middle contexts below it are the starter's (see vaelii.host.starter).
The upper ontology: every KB file under `resources/kb/upper/`, loaded into CxUniverse. `core.txt` is the vocabulary — the special-predicate surface the engine interprets (types/contexts, arg, disjoint, the `set/*Rule` wrappers, the predicate metadata, negation, `ist`, the evaluables), the predicate meta-ontology and the top of the ontology — and each other file is one domain (abstract, life, measure, organism, reflection, society, space, time). Documentation rides on `comment` sentexes, `(comment <term> "...")` — ordinary sentexes (stored, indexed, queryable) — so the KB documents itself in its own representation. CxUniverse is the root: every context the middle layer wires in sees it, and a KB built for vocabulary alone holds exactly this load. The middle contexts below it are the starter's (see vaelii.host.starter).
(comment-of kb term)The documentation attached to term by comment sentexes, in content order.
Ordered because every caller takes the first one — the vocabulary card, the prompt's
predicate lines, a selection's gloss. sentexes-matching promises the set and not
an order, so a term carrying two comments (the shipped ontology gives each one; a KB
that adds a gloss of its own gives two) would otherwise be displayed with whichever
the index happened to yield first, and the same knowledge loaded in two orders would
read differently. A vector, since the ranking realizes the matches either way.
Ranked through nm/name-key rather than on the value: comment's second argument is a
string by convention and nothing refuses another type, and a comparison of a string
against a number throws where this only has to be total. name-key is str for the
scalar the convention promises and the guarded print-key for anything else, so a
comment written as a compound cannot collapse two entries into one key under an ambient
*print-length*.
The documentation attached to `term` by `comment` sentexes, in **content order**. Ordered because every caller takes the first one — the vocabulary card, the prompt's predicate lines, a selection's gloss. `sentexes-matching` promises the *set* and not an order, so a term carrying two comments (the shipped ontology gives each one; a KB that adds a gloss of its own gives two) would otherwise be displayed with whichever the index happened to yield first, and the same knowledge loaded in two orders would read differently. A vector, since the ranking realizes the matches either way. Ranked through `nm/name-key` rather than on the value: `comment`'s second argument is a string by convention and nothing refuses another type, and a comparison of a string against a number throws where this only has to be total. `name-key` is `str` for the scalar the convention promises and the guarded `print-key` for anything else, so a comment written as a compound cannot collapse two entries into one key under an ambient `*print-length*`.
(load-into kb)Assert the upper ontology into kb: every file of upper-files, all into CxUniverse,
as one seed/load-sentences batch, so a sentence one file states over a term another
file defines is retried until that term arrives. Returns kb.
Assert the upper ontology into `kb`: every file of `upper-files`, all into CxUniverse, as one `seed/load-sentences` batch, so a sentence one file states over a term another file defines is retried until that term arrives. Returns kb.
(upper-files)The file names under kb/upper/, core.txt first and the domain files after it in
sorted order.
The file names under `kb/upper/`, `core.txt` first and the domain files after it in sorted order.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |