Giter Site home page Giter Site logo

ir-lsh's Introduction

Plagiarism Detector using LSH

This application is capable of extracting pairs similar documents from a set of documents present in a corpus. Documents containing similar texts are marked as a plagiarized pair. Locality sensitive hashing is used to find similar pairs and various distance measures such as Jaccard distance, Cosine distance and Hamming distance are used in the process. For each distance measure, a set of predicted plagiarized pairs are returned.

Features

  • Returns pairs of plagiarised or similar documents, which are answers to a question in our corpus.
  • Three different measures (Jaccard distance, Cosine distance, Hamming distance) can be used to find similar documents.
  • The algorithm shows the precision and number of correct documents returned for each distance measure.
  • The signature matrix needs to be generated only once for each distance measure.
  • Fully documented code.

How to run

  1. Clone this repo / click "Download as Zip" and extract the files.
  2. Ensure Python 3.7 is installed, and in your system PATH.
  3. Install pipenv using pip install -U pipenv.
  4. In the project folder, run pipenv install to install all python dependencies.
  5. Generate the shingle-document matrix by running: pipenv run python matrix.py. Matrix will be stored in shingles_matrix.csv.
  6. To create the signature matrix:
    1. Jaccard distance: pipenv run python jaccard_sig.py. Signature matrix stores in jaccard_signatures.csv.
    2. Cosine distance: pipenv run python cosine_sig.py. Signature matrix stores in cosine_signatures.csv.
    3. Hamming distance: pipenv run python hamming_sig.py. Signature matrix stores in hamming_signatures.csv.
  7. To run the LSH algorithm: pipenv run python main.py.

ir-lsh's People

Contributors

iamkroot avatar pyt243 avatar sheth-smit avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.