Code Monkey home page Code Monkey logo

plagiarism-checker's Introduction

Plagiarism-Checker

A utility to check if a document's contents are plagiarised.

How it works

  • It searches online using Google Search API's for some queries. Queries are n-grams extracted from the source txt file.
  • Resulting URL, matched contents are checked for similarity with given text query.
  • Result of average similarity of all URL's is stored in output text file.

Required Libraries

The project uses python-docx module to decode docx files. The python-docx module has its own set of dependent libraries. The required libraries are:

  • PIL
  • lxml
  • python-dateutil
  • python-docx

GETTING LIBRARIES ON LINUX

  • Get easy_install
sudo apt-get install python-setuptools
  • Install PIP
sudo easy_install pip
  • Install dependent libraries
sudo pip install PIL

sudo pip install lxml

sudo pip install python-dateutil
  • Install python-docx
sudo pip install docx
  • Install pdftotext for pdf support (sketchy at the moment)
sudo apt-get install poppler-utils
  • Get ppt and doc support
sudo apt-get install catdoc

GETTING LIBRARIES ON WINDOWS

These steps assume you already have python installed and that python is in your windows environment variables.

Download setup-tools according to your python version. (That is python 2.7 in most cases)

Run the .exe file. The installer will automatically find your python installation location from the registry and install easy_install to the Scripts directory where your python installation is located.

Once the installer has run, add easy_install to the windows environment variables path.

  • Open a command window
  • Run the following command:
easy_install pip
  • Then install the required libraries for docx support
pip install PIL

pip install lxml

pip install python-dateutil

pip install docx
  • EXEs for pdf, ppt and doc support are included in the package. Nothing need be installed.

Folder Structure

  • assets/

Holds Twitter Bootstrap CSS and Javascript files and images/glyphicons

  • config/

Stores configuration data (Path to Python on Windows)

  • scripts/

Contains python scripts to perform plagiarism checks

  • temp/

Contains uploaded files

Python Scripts

Backend is supported using python. There are 3 scripts in total.

  • scripts/main.py

Main script which gets the results of plagiarism

  • scripts/htmlstrip.py

Used to strip text from HTML tags

  • scripts/cosineSim.py

Helper modules to find cosine similarity between strings

Usage of Python Script (Standalone)

python main.py sampleText.txt sampleOut.txt

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.