demo · v141
Proofread
Drop messy text in, press proofread, and watch the on-device language model return a corrected string and a list of replacement ranges. Runs the same API surface as Summarizer / Translator / Prompt.
Heads up
Origin trial. Enable
chrome://flags/#proofreader-api-for-gemini-nano and download the on-device model via chrome://components. First call may take seconds while the model warms up; subsequent ones are fast.
probing window.Proofreader…
the call
const proof = await Proofreader.create({
expectedInputLanguages: ["en"],
correctionExplanationLanguage: "en",
});
const result = await proof.proofread(text);
console.log(result.correctedInput);
for (const c of result.corrections) {
console.log(c.startIndex, c.endIndex, "→", c.correction, c.type);
}
see also
- Proofreader API — feature index
- ChromeStatus entry
- Explainer