This Python script analyzes Jupyter Notebooks (.ipynb files) to compute similarity between text, code, and cell IDs across multiple notebooks. It performs the following key tasks:
- Parse Jupyter Notebooks: Extracts text and code cells from notebooks.
- Calculate Similarities: Uses TF-IDF and cosine similarity to compare text and code, and Jaccard similarity for cell IDs.
- Identify Unique Cells: Finds cells that are not common across the notebooks and computes their similarities.
- Combine Similarity Matrices: Combines normalized similarity matrices for text, code, and IDs into a single matrix.
To install the program:
- Clone project folder.
git clone https://github.com/JohannFaust666/Document-Plagiarism-Detection.git- Create virtual env:
python3 -m venv venv
source venv/bin/activate- Install requirements:
pip install -r requirements.txt- Run:
streamlit run app.py- TF-IDF & Cosine Similarity: Measures the similarity between text and code.
- Jaccard Similarity: Measures similarity between cell IDs.
- Matrix Normalization: Ensures each similarity matrix is normalized between 0 and 1.
- Combines Results: Generates a combined similarity matrix to provide a holistic comparison across notebooks.