Skip to main content

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

Metadata

Release files for copy-spotter 0.1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for copy-spotter 0.1.16
File Size Uploaded
copy-spotter-0.1.16.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for copy-spotter 0.1.16
File Interpreter ABI Platform
copy_spotter-0.1.16-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / copy-spotter-0.1.16.tar.gz

Download URL copy-spotter-0.1.16.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d3051ebb7d5f3384b7c2279d92520f1a6f7d2e9f0a3ed8333ec3136011dacd13
BLAKE2b-256 checksum
How to use checksums
d8ad4d9ebc88ccd251829d1187cc5248aab12fa9192e24553905caa0b90dd9e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release files / copy_spotter-0.1.16-py3-none-any.whl

Download URL copy_spotter-0.1.16-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de87eef4e86489ab4c19c08280479fd5cb66b610c3bd548ada2a0c770751e3b3
BLAKE2b-256 checksum
How to use checksums
59e4ce25adf112a925b259ecdfde91f19c36c7e7b5d897af7e0751677dfb64cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.16 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page