Built to order

AI Powered Plagiarism Detector for Assignments

This project builds a plagiarism detector for student assignments: paste or upload a document and it returns a 0–100% similarity score against a reference corpus, lists every matched passage and shows both documents side-by-side with matches highlighted. The engine combines TF-IDF vectorization, cosine similarity and 5-word shingle matching, and runs entirely in the browser — no text leaves the page. A ~2,200-word pair compares in roughly 20 ms (measured in the demo build). Suitable for B.E./B.Tech final-year projects in Computer Science, IT and AI & Machine Learning.

Computer / IT FileReader APIzero dependencies)TF-IDF · cosine similarityWord-shingle fingerprintingHTML5 · CSS3 single-file appSVG score gaugeEnglish stopword listSoftware
AI Powered Plagiarism Detector for Assignments — project thumbnail preview
More project photos (2)

The problem

Teachers checking assignments for copying usually have two bad options: reading every submission against every other by hand, or trusting an expensive black-box web service that gives a percentage with no explanation. Students, meanwhile, rarely understand what "similarity" even measures, so the score feels arbitrary. This project takes the transparent route — it builds the detection engine from scratch with classical information-retrieval techniques, so every number on screen can be traced back to a concrete mechanism. A submitted assignment is tokenized, weighted by TF-IDF, and compared against each reference document with cosine similarity; a second layer hashes sliding 5-word shingles to pinpoint the exact copied phrases. The result is a similarity report a teacher can actually interrogate: which documents matched, which passages overlap, and how the score was computed. Because the whole engine runs locally in a single HTML file, the student owns every line of the algorithm and can defend it in the viva.

How it works

  1. The assignment text is pasted or uploaded; the app lowercases it, splits it into word tokens and removes a built-in stopword list so rare, meaningful words dominate.
  2. Every document — the submission plus each corpus document — is converted to a TF-IDF vector: each word's weight is its frequency in the document multiplied by how rare it is across the corpus.
  3. Cosine similarity between the submission vector and each corpus vector produces a 0–100% score per reference document; comparing angles (not lengths) keeps short and long essays comparable.
  4. In parallel, sliding windows of 5 consecutive words (shingles) are hashed for every document; any shingle appearing in both marks an exact copied phrase.
  5. Overlapping shared shingles merge into passages, which are highlighted in the report and in the side-by-side view with character-accurate spans.
  6. Scores below the configurable flag threshold are dimmed; the top score sets the verdict band shown on the gauge.
  7. Changing shingle size, threshold or stopword handling re-runs the whole pipeline instantly, so the effect of each choice is visible.

Tech stack:

  • JavaScript (ES6, zero dependencies)
  • TF-IDF vectorization · cosine similarity
  • Word-shingle (n-gram) fingerprinting
  • HTML5 · CSS3 single-file web app
  • FileReader API (.txt uploads)
  • SVG similarity gauge
  • Built-in English stopword list
  • Python 3 (batch folder-check script)

Dataset & model details

  • Dataset: Built-in sample corpus of 6 student essays authored for this project (AI in education, AI in classrooms, machine-learning fundamentals, climate and agriculture, smart homes, solar power) — 100–160 content words each after stopword removal. This is a demonstration set, not a public benchmark; the design supports swapping in a real institutional corpus or the public PAN plagiarism-evaluation corpora.
  • Task: Document-level similarity scoring. Input = plain-text assignment (pasted or .txt upload, up to 20,000 characters per upload by design). Output = one 0–100% cosine score per reference document plus character-span matched passages.
  • Model: Classical information retrieval, not a neural network — TF-IDF weighted vectors compared with cosine similarity, plus 5-word shingle intersection for verbatim-phrase evidence. No training step, no learned weights, no claimed accuracy.
  • Metrics: No accuracy is claimed as measured. The honest evaluation for the buyer is a labeled pair set (copied / paraphrased / original pairs they assemble) scored for precision and recall at a chosen threshold, with the procedure documented in the report. Latency is measured: a ~2,200/2,400-word document pair compares in roughly 20 ms in the demo build.
Parameter Value
Input format Plain text (paste) or .txt upload, up to 20,000 characters per upload (design limit)
Reference corpus 6 sample essays, 100–160 content words each after stopword removal (built-in)
Shingle size 5 words default, adjustable 3–8 words (design)
Score range 0–100% cosine similarity per reference document (computed live)
Verdict bands High ≥45%, Moderate ≥18%, Low ≥8% (design defaults, adjustable)
Comparison speed Approximately 20 ms for a ~2,200-word pair (measured in the demo build)
Runtime Fully offline in the browser; no text leaves the page (by design)
Deliverable Single-file HTML app + report PDF + PPT + viva Q&A

Project features

  • [Similarity score gauge] Each checked document gets a 0–100% score against every reference document, shown on an animated gauge with an overall verdict band (High, Moderate, Low, Clean).
  • [Matched-passage highlighting] Overlapping 5-word shingles merge into highlighted passages, so the exact copied sentences are visible in context instead of just a number.
  • [Side-by-side comparison view] The checked document and any reference document render next to each other with shared phrases highlighted in both, making the overlap instantly verifiable.
  • [Per-source score breakdown] A ranked bar list shows the similarity against each corpus document separately, so near-misses and the true source are distinguishable.
  • [Adjustable detection settings] Shingle size (3–8 words), flag threshold and stopword removal are configurable, and the report re-computes live — useful for demonstrating how each parameter changes the result.
  • [Paste, upload and sample corpus] Documents can be pasted, loaded from a built-in sample essay, or uploaded as .txt files; the demo ships with a 6-essay sample corpus the engine compares against.
  • [Batch folder checking (optional)] A Python script checks a whole folder of submissions pairwise and writes a similarity matrix CSV, for class-level originality screening.
  • [Web-source checking (future scope)] Querying search-engine APIs for web matches is designed but not implemented; the report documents the API and cost considerations for a buyer who wants it.

What is included

  • Working plagiarism-detector web app (single HTML file, engine source included)
  • Built-in 6-essay sample corpus with the overlapping passages documented
  • Python batch folder-check script with similarity-matrix CSV output
  • Project report PDF (IR background, TF-IDF/cosine/shingle theory, methodology, evaluation procedure)
  • PPT presentation for final review
  • Viva Q&A preparation document (tokenization, TF-IDF, cosine geometry, shingle trade-offs, paraphrase limits)
  • Corpus-extension guide: how to plug in institutional submissions or the PAN evaluation corpora

Limitations & prerequisites

  • Catches verbatim and lightly-edited copying; heavily paraphrased text that swaps the rare words scores low — the engine measures lexical overlap, not meaning.
  • The built-in corpus is only 6 short essays; a real deployment must be loaded with the institution's own submissions.
  • No web-source checking in the shipped build — that needs a paid search API and is documented as future scope.
  • Uploads are capped at 20,000 characters per file by design; longer dissertations must be split.
  • Plain text only — scanned PDFs and images need an OCR step first (not included).
  • A similarity score is evidence for a teacher's judgment, not proof of plagiarism; the report states this explicitly.

Frequently Asked Questions

How does the detection actually work?

Each document becomes a TF-IDF vector — words weighted by how often they appear in the document and how rare they are across the corpus. Cosine similarity between vectors gives the 0–100% score, and a second layer hashes sliding 5-word shingles to find the exact copied phrases, which are highlighted in the report.

Does it use a neural network?

No. The shipped engine is classical information retrieval: no training, no learned weights, no GPU. That is a deliberate choice — every score is explainable step by step, which is exactly what a viva examiner wants to hear. A neural embedding extension is listed as future scope.

Can it catch paraphrased copying?

Partly. Light edits that keep the rare words still score high on cosine similarity, but a thorough rewrite that swaps the distinctive vocabulary will slip past the lexical signal. The report is honest about this boundary and the shingle layer only fires on near-verbatim phrases.

What does it check the assignment against?

The demo ships with a built-in sample corpus of 6 essays so the engine has something to compare against. The full project is designed to load real corpora — a folder of class submissions for pairwise checking, or the public PAN plagiarism-evaluation corpora — and the extension guide documents both.

Why do two documents of very different lengths still compare fairly?

Cosine similarity compares the angle between document vectors, not their lengths, so a 200-word essay and a 2,000-word essay are judged on the direction of their word patterns. Length still matters indirectly: very short texts have noisier scores, which the report notes.

Is this project suitable for a final-year project?

Yes — for Computer Science, IT and AI/ML programs. It covers text preprocessing, TF-IDF, vector-space similarity and n-gram fingerprinting with a genuinely working tool, and the viva kit explains each algorithm from first principles.

Components & software requirements
  • JavaScript (ES6, zero dependencies)
  • TF-IDF vectorization · cosine similarity
  • Word-shingle (n-gram) fingerprinting
  • HTML5 · CSS3 single-file web app
  • FileReader API (.txt uploads)
  • SVG similarity gauge
  • Built-in English stopword list
  • Python 3 (batch folder-check script)

Dataset & model details

  • Dataset: Built-in sample corpus of 6 student essays authored for this project (AI in education, AI in classrooms, machine-learning fundamentals, climate and agriculture, smart homes, solar power) — 100–160 content words each after stopword removal. This is a demonstration set, not a public benchmark; the design supports swapping in a real institutional corpus or the public PAN plagiarism-evaluation corpora.
  • Task: Document-level similarity scoring. Input = plain-text assignment (pasted or .txt upload, up to 20,000 characters per upload by design). Output = one 0–100% cosine score per reference document plus character-span matched passages.
  • Model: Classical information retrieval, not a neural network — TF-IDF weighted vectors compared with cosine similarity, plus 5-word shingle intersection for verbatim-phrase evidence. No training step, no learned weights, no claimed accuracy.
  • Metrics: No accuracy is claimed as measured. The honest evaluation for the buyer is a labeled pair set (copied / paraphrased / original pairs they assemble) scored for precision and recall at a chosen threshold, with the procedure documented in the report. Latency is measured: a ~2,200/2,400-word document pair compares in roughly 20 ms in the demo build.
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Related guides

All guides

SQL vs NoSQL for Final-Year Projects: Which Database Should You Pick?

MySQL or MongoDB for your final-year project? SQL databases store data in related tables with enforced schemas, joins and transactions — the right default when your data is structured and money or records must stay consistent. NoSQL document stores trade the rigid schema for flexible, nested documents that ship faster when your data shape keeps changing. This guide compares them with a worked hospital-appointment example in both, a decision table, and rules matched to common project archetypes.

Read guide

Testing Your Student API with curl and Postman

When a request fails through a browser app, the bug could be in the frontend, the network, or the API. This guide shows how to test a student API directly with curl and Postman: health checks, endpoint-by-endpoint tests, status-code reading, authentication flows, saved collections, and a small smoke-test script to run before every demo.

Read guide

React vs Django vs Laravel: Picking the Right Stack for Your Final-Year Web Project

React, Django, or Laravel for your final-year web project? First, fix the category error: React is a frontend UI library that needs a backend, while Django and Laravel are full-stack backends. This guide compares the three on learning curve, project fit, hosting cost and job relevance, with a decision table, a code comparison of the same feature three ways, and rules for when a React SPA is overkill — so you commit to a stack with evidence, not hype.

Read guide
Get a quotation