Coder Social home page Coder Social logo

wazzabeee / plagiarism_checker Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 10.0 27.94 MB

Make plagiarism detection easier. This script will find similar sentences between given files and highlight them in a side by side comparison.

Home Page: https://pypi.org/project/copy-spotter/

License: MIT License

Python 95.87% HTML 4.13%
python plagiarism-detection plagiarism side-by-sidediff pdf docx odt txt plagiarism-checker plagiarism-detector similarity-score similarity beautifulsoup bs4 plagiarism-check similarity-detection

plagiarism_checker's Introduction

Copy Spotter

PyPI - Version PyPI - License Python

GIF demo

About

This program will process pdf, txt, docx, and odt files that can be found in the given input directory, find similar sentences, calculate similarity percentage, display a similarity table with links to side by side comparison where similar sentences are highlighted.

Usage

$ pip install copy-spotter
$ copy-spotter [-s] [-o] [-h] input_directory

Positional Arguments:

  • input_directory: One directory that contains all files (pdf, txt, docx, odt) (see data/pdf/plagiarism for example)
input_directory/
│
├── file_1.docx
├── file_2.pdf
└── file_3.pdf

Optional Arguments:

  • -s, --block-size: Set minimum number of consecutive and similar words detected. (Default is 2)
  • -o, --out_dir: Set the output directory for html files. (Default is creating a new directory called results)
  • -h, --help: Show this message and exit.

Examples

# Analyze documents in 'data/pdf/plagiarism', with default settings
$ copy-spotter data/pdf/plagiarism

# Analyze with custom block size and specify output directory
$ copy-spotter data/pdf/plagiarism -s 5 -o results/output

Development Setup:

# Clone this repository
$ git clone https://github.com/Wazzabeee/copy_spotter

# Go into the repository
$ cd copy_spotter

# Install requirements
$ pip install -r requirements.txt
$ pip install -r requirements_lint.txt

# Install precommit
$ pip install pre-commit
$ pre-commit install

# Run tests
$ pip install pytest
$ pytest tests/

# Run package locally
$ python -m scripts.main [-s] [-o] [-h] input_directory

Recommandations

  • Please make sure that all text files are closed before running the program.
  • In order to get the best results please provide text files of the same languages.
  • Pdf files that are made from scanned images won't be processed correctly.
  • Ensure you have writing access when using the package
  • If a specific file is not processed correctly feel free to contact me so that I can address the issue.

TODO

  • Add more tests on existing functions
  • Implement OCR with tesseract for scanned documents
  • Add custom naming option for pdf files

plagiarism_checker's People

Contributors

dependabot[bot] avatar hoehnp avatar wazzabeee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plagiarism_checker's Issues

Example files produce an empty html page as output

Hi!
I've downloaded and installed the requirements, I've tried to test the application using the file that are in the folder 'data/pdf_tests' but the result is an empty html page.

This is the command used:
python scripts/main.py data/pdf/pdf_tests/ -s 2 -o res/

This is the output file give as result:

<table>
 <tbody>
  <tr>
   <td>
   </td>
  </tr>
 </tbody>
</table>

Is there anything that can fix it? Am I doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.