sandeepmohamed666/AI-Powered-Plagiarism-Detection-System

GitHub: sandeepmohamed666/AI-Powered-Plagiarism-Detection-System

基于 NLP 和机器学习的端到端抄袭检测系统,支持多格式文本与源代码的相似度分析。

Stars: 0 | Forks: 0

# NLP 抄袭检测系统 一个端到端的抄袭检测项目,包含 **Flask 后端**、**现代前端 UI**、**NLP 相似度引擎**、**源代码抄袭模式**、**训练 notebook** 以及持久化的 **`.pkl` 模型文件**。 ## 覆盖范围 本系统支持基于 NLP 的抄袭检测,适用于: - 文本抄袭 - 研究论文 - 书籍 - 文章 - 论文 - 电子邮件 - 聊天消息 - 网站内容(通过 URL 抓取) - 源代码抄袭 ## 支持的文件类型 后端支持多种格式的文本提取和尽力解析: - 文档:`.txt`, `.md`, `.pdf`, `.docx`, `.rtf` - 网页与数据:`.html`, `.htm`, `.csv`, `.json`, `.xml`, `.yaml`, `.yml` - 通信记录:`.eml`, `.log` - 源代码:`.py`, `.js`, `.ts`, `.java`, `.c`, `.cpp`, `.cs`, `.go`, `.rs`, `.php`, `.rb`, `.swift`, `.kt`, `.scala`, `.sh`, `.sql`, `.css`, `.scss`, `.jsx`, `.tsx` - 未知扩展名将通过尽力文本解码进行处理。 ## 项目结构 ``` Plagiarism Detection System/ app.py requirements.txt backend/ frontend/ models/ notebooks/ scripts/ data/reference_corpus/ uploads/ ``` ## 设置 1. 安装依赖项: pip install -r requirements.txt 2. 训练并生成 `.pkl` 文件: python scripts/train_model.py 3. 运行应用程序: python app.py 4. 打开: - `http://127.0.0.1:5000` ## React + Recharts 前端 (Vite) 本项目现在在 `frontend/react_app` 中包含了一个 React 前端,并且 Flask 已配置为托管来自 `frontend/react_dist` 的 Vite 构建输出。 ### 一次性前置条件 1. 安装 Node.js LTS(包含 npm)。 2. 在项目根目录下,安装前端依赖项: cd frontend/react_app npm install ### 开发模式(推荐用于 UI 开发) 1. 运行 Flask 后端: python app.py 2. 在第二个终端中,运行 Vite 开发服务器: cd frontend/react_app npm run dev 3. 打开: - `http://127.0.0.1:5173` Vite 会将 `/api/*` 调用代理到 `http://127.0.0.1:5000` 的 Flask。 ### 由 Flask 托管的生产构建 1. 构建前端: cd frontend/react_app npm run build 2. 运行 Flask: python app.py 3. 打开: - `http://127.0.0.1:5000` 如果 `frontend/react_dist/index.html` 存在,Flask 将托管 React 应用程序;否则,它将回退到 `frontend/templates/index.html` 中的原始模板。 ## 机器学习库(Pandas, NumPy, Scikit-learn, XGBoost) 所有依赖项现在都集中在一个文件中:`requirements.txt`。 Windows 上的推荐设置: 1. 安装 Python 3.14.5。 2. 创建新环境: py -3.14 -m venv .venv .venv\Scripts\activate 3. 安装所有项目依赖项: pip install -r requirements.txt 之后,notebook 就可以直接导入这些包了。 ## API 端点 - `GET /api/health` - `POST /api/check-text` - JSON 字段:`text`, `compare_text`(可选),`url`(可选),`mode`(`text` 或 `source_code`) - `POST /api/check-files` - 表单字段:`files`(多个),`mode`(`text` 或 `source_code`) ## 注意事项 - 如果 `models/` 中缺少模型文件,系统将回退到加权启发式分数。 - 如用于生产环境,请添加更大的人工筛选的参考语料库和更强的训练数据。
标签:Apex, Flask, React, Syscalls, 人工智能, 抄袭检测, 文本相似度计算, 机器学习, 用户模式Hook绕过, 网络测绘, 逆向工具