API Reference / interpret · function

Function: interpret()

function interpret(ctx, sources): Reading;

Run interpretation sources against a fact projection and return a ranked Reading. Each rule whose selector matches emits an entry carrying the matched atom ids (provenance) and a salience = sum of those atoms' salience x the rule weight. The engine never ships the content: the sources are the caller's.

Parameters

ParameterTypeDescription
ctxInterpretationContextA projection from interpretationContext.
sourcesInterpretationSource[]One or more InterpretationSource corpora.

Returns

Reading

The Reading; entries are sorted by descending salience.

Start building

Quickstart →