← All packages

@lacspace/factcheck-lite

v1.0.1Newsroom Kit1 @lacspace dep

Deterministic fact-consistency checks for generated articles — extract every number, amount, percentage, date and named entity (Devanagari digits, लाख/करोड scaling, रु/NPR, %/प्रतिशत, AD + Bikram Sambat dates) and verify each appears in, or is derivable from, the sources. Catches fabricated or drifted figures without an LLM rewrite round; cross-script entity matching via @lacspace/translit. Isomorphic, deterministic.

npm i @lacspace/factcheck-lite

Usage

factcheck-lite.ts
import { verify, extractClaims } from "@lacspace/factcheck-lite";

const r = verify(generatedArticle, sourceTexts, { numberTolerance: 0 });
r.ok;          // false if any figure is unsupported
r.mismatches;  // [{ type: "percentage", value: 6.5, nearest: 5.5, note }]
// 12 crore == १२ करोड == 120,000,000 all compare equal; entities matched across scripts via @lacspace/translit

Exports 5

extractClaimsverifyextractNumericextractDatesnormalizeDigits

Keywords

fact-checkverificationclaimsnumbersdatesbikram-sambatnepalihallucinationgroundingnewsroom

More in Newsroom Kit