Paperless NGX Dedupe

Near-duplicate finder for Paperless-NGX on MinHash and LSH

Syncs documents from Paperless-NGX, shingles their OCR text into 256-permutation MinHash signatures and uses LSH bands to find candidate pairs without comparing every document to every other, then scores, clusters and shows them side by side. Optional LLM metadata. One container, SQLite.

Trade-offs

  • MinHash and LSH instead of comparing every pair: candidates come out in O(n log n), at the cost of a probabilistic estimate whose recall and precision are tuned through permutations and bands.
  • A discriminative penalty down-scores pairs that share a template but differ in dates, amounts or invoice numbers, so boilerplate alone doesn't make two invoices duplicates.
  • Documents under 20 words are skipped, since too few shingles make the comparison unreliable.

Q&A3

A base score weights Jaccard overlap 60 and fuzzy edit-distance similarity 40, then the discriminative penalty, at strength 70 by default, scales it down when structured data differs. Every weight is configurable.

Reviews

Loading reviews

    More from @rknightion

    All 2 →
    • tailscale2otelTailscale fleet, flows and audit logs as OpenTelemetry

    More in Idempotency

    See all 8 →
    • blitcpFile copier that reads in disk order, dedupes and streams over raw SSH
    • RRQClosed-loop payment ledger on sharded Postgres with a Kafka outbox
    • clinkC++ stream processing engine that stays correct when processes die
    • Job Scheduler PlatformDurable one-off and cron jobs posted to webhooks, with retries and a DLQ
    • File HunterSelf-hosted catalogue of archive drives that stays searchable offline
    • FinCore EngineSelf-hosted JVM core for a double-entry ledger, payments and compliance

    More in Self-hosted

    See all 120 →
    • SupermetryCookie-free web and product analytics on one Go binary and PostgreSQL
    • jobdGPU-aware job broker for a few personal machines, with an MCP server
    • OVLTSelf-hosted OIDC server in one Rust binary, multi-tenant through Postgres RLS
    • FusionalySelf-hosted web analytics in one SQLite file
    • KotauthMulti-tenant OAuth2 and OIDC identity server in Kotlin, self-hosted in Docker
    • TouchDeckA local touch control deck for Home Assistant and PC stats on an ESP32-S3

    More in TypeScript

    See all 176 →
    • Charted RootsGenealogy and worldbuilding inside an Obsidian vault, from GEDCOM to maps
    • Prisma CalendarCalendar, timelines and recurring notes over the dated notes in Obsidian
    • MigrationPilotPostgreSQL migration linter that blocks unsafe DDL before merge
    • TileLineBasePlain-text database for Obsidian with tables, kanban, gallery and slides
    • JDFDocument format in plain JSON that renders like a PDF and diffs in git
    • MuTracerPhysically based path tracer for the web on WebGPU, with a WebGL 2 fallback