Simple academic project demonstrating local plagiarism and AI-like content detection without external APIs.
Files:
index.html— main UIstyle.css— basic stylingscript.js— detection logic and UI wiringreference.txt— sample reference text used for similarity checks
How to use:
- Open
index.htmlin a browser (double-click or serve from a local server). - Upload a
.txtfile or paste text into the textarea. - Click "Analyze" to get:
- Word count
- Sentence count
- Average sentence length
- Plagiarism / similarity percentage (compares words to
reference.txt) - AI-generated likelihood percentage and label (Human-written / Mixed / Likely AI-generated)
Notes & limitations:
- This project uses simple, explainable heuristics suitable for coursework. It is not production-grade.
- AI detection is only an estimation. See the disclaimer in the UI.
- No external APIs or network calls are required except loading
reference.txtlocally.
Server mode (recommended for PDF / DOCX support):
- Install dependencies (Node.js required):
npm install- Start the server:
npm start- Open the app at
http://localhost:3000/index.htmland upload.txt,.pdf, or.docxfiles.
Notes:
- The server uses
pdf-parseandmammothto extract text from PDF and DOCX files. - AI detection is an estimation based on simple linguistic heuristics.
Ideas for extension:
- Use multiple reference files or simple n-gram overlap for stronger plagiarism checks.
- Add a settings panel to tune weights used in AI-likelihood computation.
Enjoy and modify for learning!