Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / clauseAround

Function: clauseAround()

ts
function clauseAround(sentence, anchorIndex): string;

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

The claim clause nearest an anchor (RV4208): the sentence segment, cut at clause boundaries (';' or ',' followed by whitespace), that contains the anchor position. Pure text arithmetic, no NLP: the point is to hand the judge the claim half the anchor was cited FOR instead of the whole compound sentence.

Parameters

ParameterType
sentencestring
anchorIndexnumber

Returns

string