Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / parseCitationVerdicts

Function: parseCitationVerdicts()

ts
function parseCitationVerdicts(output, rowIndexes): 
  | Map<number, {
  reason: string;
  verdict: "partial" | "supported" | "unsupported";
}>
  | undefined;

Defined in: packages/core/dist/index.d.ts

Parses the judge output strictly: one verdict per judged row, no duplicates, no rows beyond the judged set, verdicts from the closed vocabulary. Anything else returns undefined and the caller treats the invocation as a failed judge (nothing was judged; partial verdicts over a partial parse would claim more than the judge said). The row set is a BIJECTION with the sample (RV4402): a fabricated extra row is a parse failure, never surplus information, because a judge inventing rows is a judge whose output cannot be trusted about the rows it was asked.

Parameters

ParameterType
outputunknown
rowIndexesreadonly number[]

Returns

| Map<number, { reason: string; verdict: "partial" | "supported" | "unsupported"; }> | undefined