Déposez un texte brut, une photo ou un PDF. Choisissez ce qui est sensible, et récupérez une copie caviardée — des rectangles noirs gravés dans les pixels, pas un calque qu'on peut retirer.
Votre téléchargement a dû démarrer automatiquement.
La démo ci-dessus est une simple surcouche de la bibliothèque que vous pouvez installer. Un cœur en Rust, des liaisons natives pour chaque langage — pas d'appel REST, aucun serveur à faire tourner.
# install
cargo install redact-paperasse-cli
# image in, redacted image out (same format)
redactpapr letter.jpg --output letter.redacted.jpg
# only redact French social security numbers
redactpapr letter.jpg --entities FR_NIR --output out.jpg
# OCR a scan and get redacted markdown instead of pixels
redactpapr scan.pdf --format markdown
# see what was found, without the matched text itself
redactpapr letter.jpg --report --output out.jpg// npm install redact-paperasse
import {
redactText, redactImage, redactPdf,
redactImageText, redactPdfText,
} from 'redact-paperasse';
// text in, text out
const clean = await redactText(raw, { markdown: false });
// image in, redacted image bytes out
const png = await redactImage(buf, { entities: ['FR_NIR', 'EMAIL_ADDRESS'] });
// same image, but give me the OCR'd redacted text instead
const md = await redactImageText(buf);
// PDFs work both ways too
const pdf = await redactPdf(pdfBuf);
const pdfMd = await redactPdfText(pdfBuf, { score_threshold: 0.9 });# pip install redact-paperasse
import asyncio
import redact_paperasse as rp
async def main():
# text in, text out
clean = await rp.redact_text(raw, markdown=False)
# image in, redacted image bytes out
data = open("letter.jpg", "rb").read()
png = await rp.redact_image(data, entities=["FR_NIR"])
# or the OCR'd redacted text, skipping the pixel step
md = await rp.redact_image_text(data)
# PDFs, same two shapes
pdf = await rp.redact_pdf(pdf_bytes)
pdf_md = await rp.redact_pdf_text(pdf_bytes)
asyncio.run(main())// cargo add redact-paperasse-core
use redact_paperasse_core::{Engine, Input, OutputFormat};
let engine = Engine::default();
// image in, redacted image bytes out
let out = engine
.process(Input::Image(bytes), OutputFormat::Native, None, None)
.await?;
std::fs::write("redacted.jpg", out.bytes.unwrap())?;
// only certain types, above a confidence floor
let only = ["FR_NIR".to_string()];
let out = engine
.process(Input::Text(s), OutputFormat::Markdown, Some(&only), Some(0.9))
.await?;
println!("{}", out.markdown.unwrap());// Built from source with wasm-pack — see bindings/wasm in the repo.
// Runs entirely client-side: the file never leaves the browser.
import init, { redactText, redactImage, redactImageText }
from './pkg/redact_paperasse_wasm.js';
await init();
const clean = await redactText(raw, false, ['EMAIL_ADDRESS'], null);
Pas de redactPdf dans la version
navigateur : l'étape PDF → image n'existe pas pour wasm32 en amont. De toute façon,
c'est le caviardage de texte qui gagne vraiment à tourner côté client.