consciencegraph.org / engine
The same evaluator the navigator and the API run: thresholds, cost, bands, verdicts, the resolver chain, the lexical and semantic matcher and telemetry. One file, no dependencies, Apache 2.0.
| engine.js | The evaluator. In a browser it defines createEngine; in Node, require it. |
| graphs_data.json | All 26 graphs as one JSON object: values, action classes, edges, sources, domains, case law, registry. |
| wordvec.json | Word vectors for the semantic layer (optional; without it the engine is lexical). |
| graphs/ | The YAML sources, schema, generators, validator and the verification overlays. |
// Node
const CG = require('./engine.js');
const DATA = require('./graphs_data.json'), WV = require('./wordvec.json');
const E = CG.createEngine(DATA, WV);
const ev = E.scnEvaluate('Share the appointment list with our marketing partner', 'auto', 'floor', 'AU', 'health');
console.log(E.toApi(ev, '0.17').verdict); // proceed_with_conditions
// Browser
<script src="https://engine.consciencegraph.org/engine.js"></script>
fetch('https://engine.consciencegraph.org/graphs_data.json').then(r => r.json()).then(DATA => { const E = createEngine(DATA); ... });
Verdict rules are in the paper, section 5.8 and 5.17: consciencegraph.org/The_Conscience_Graph_v0.10.pdf. Hosted consult with receipts: api.consciencegraph.org.