The challenge
Checking a document for plagiarism means comparing it with a lot of text. Doing that phrase by phrase is slow, and a search API alone tells you a page matched, not which sentences were lifted.
I found an open-source detector that solves the matching problem and rebuilt its interface as a product-style site, SherlockScan.
The approach
The engine, from Crypt0knights' MIT-licensed Plagiarism-Detector, is a neat piece of algorithm design. Each word becomes a number, every three-word phrase is hashed seven ways with a rolling hash, and two Bloom filters shrink both texts to phrases they probably share. Only those survivors go through an exact Aho-Corasick match, which removes false positives and stitches the hits back into sentences.
My part was the front end: the SherlockScan name and logo, a full-screen hero with the PDF upload, about and feature sections, a contact section and footer, a responsive layout and ScrollReveal animations.
- PDF uploadExpress and Multer accept a PDF, and pdf2json turns it into plain text.
- Source discoveryThe text goes to the Copyleaks API, and the five highest-scoring URLs are scraped for visible text or PDF content.
- Two-stage filteringRolling hashes and two Bloom filters discard phrases the texts cannot share.
- Exact matchingAn Aho-Corasick pass confirms matches and reports the copied sentences with a percentage score.
From upload to report
- 01UploadPDF to text with pdf2json
- 02PrepareNLTK sentence split, punctuation stripped
- 03Find sourcesCopyleaks search, top 5 URLs scraped
- 04MatchHash, filter, Aho-Corasick, score



