Demonstrates glossary_check.js against draft client-facing text.
Type or paste a sentence. The checker flags banned terms (red), preferred-terms (amber),
and gives the suggested replacement. Switch between strict and advisory modes below.
Each banned phrase below should produce a flag:
terminated → "went on disability"retainer → "equity payout right"accounting fraud → "unconsented commercial use"Maria → "Martha Long"occasional, isolated, one-off → "patterned" / "systematic"without consent → "without written consent"ongoing since 2017 → reframe to actionable post-6/15/2020 windowwe believe, it appears that → state documented fact + cite BatesPreferred-term suggestions (advisory only): per patent, lost fees, appropriation, infringe.
import { glossaryCheck, applyRewrites } from "./glossary_check.js";
const r = glossaryCheck("the firm terminated Mr. Litman", "strict");
// r.ok === false
// r.errors[0] === { term:"terminated", replacement:"went on disability", reason:"…", index:9, length:10 }
const fixed = applyRewrites(r ? "the firm terminated Mr. Litman" : "");
// "the firm went on disability Mr. Litman" ← rewrites are mechanical; review before saving