API Reference
scoreSubjects()
Scores subjects from explicit ScoreSignal facts and ranks the resulting view (D573).
Import
import { scoreSubjects } from "@graphrefly/ts/scoring";
Signature
function scoreSubjects(
subjects: readonly ScoreSubject<T>[],
signals: readonly ScoreSignal[],
policy: ScorePolicy,
opts: ScoreSubjectsOptions = {},
): ScoredView<T>
Parameters
| Parameter | Type | Description |
|---|---|---|
subjects | readonly ScoreSubject<T>[] | subjects value used by the helper. |
signals | readonly ScoreSignal[] | signals value used by the helper. |
policy | ScorePolicy | Policy object used to admit, retry, or route work. |
opts | ScoreSubjectsOptions | Options that configure the helper. |
Returns
A ScoredView<T> value.
Example
import { scoreSubjects } from "@graphrefly/ts/scoring";
Source
packages/ts/src/scoring/helpers.ts