API Reference / Rule · interface
Interface: Rule
One interpretation: a condition and the text it licenses.
Properties
| Property | Type | Description |
|---|---|---|
<a id="id"></a> id | string | Stable 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> text | string | ((match, ctx) => string) | The interpretation text, or a function of the match for templating. |
<a id="weight"></a> weight? | number | Multiplies the matched atoms' salience when ranking (default 1). |
<a id="when"></a> when | Selector | The condition over the fact projection. |