API Reference / Rule · interface

Interface: Rule

One interpretation: a condition and the text it licenses.

Properties

PropertyTypeDescription
<a id="id"></a> idstringStable id, unique within its source.
<a id="tags"></a> tags?string[]Free-form labels (theme, polarity, ...) carried through to the entry.
<a id="text"></a> textstring | ((match, ctx) => string)The interpretation text, or a function of the match for templating.
<a id="weight"></a> weight?numberMultiplies the matched atoms' salience when ranking (default 1).
<a id="when"></a> whenSelectorThe condition over the fact projection.

Start building

Quickstart →