Glossary Check — demo

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.

Mode: v?

Try these examples

Each banned phrase below should produce a flag:

Preferred-term suggestions (advisory only): per patent, lost fees, appropriation, infringe.

Programmatic API
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