Giter Club home page Giter Club logo

inverted_indexer's Introduction

MIT License


Logo

Inverted Indexer

An Inverted Indexer written in Python

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License

About The Project

This creates an Inverted Index for the given Corpora. Inverted Index is a mapping of content (Words, Numbers etc) to its location in a document(s) and is used for fast full text searching. This python script creates a word-level inverted index.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/saeenyoda/Inverted_Indexing.git
  2. Install Requirements
    pip3 install -r requirements.txt

Usage

How to Run

  1. Open up command line or terminal and navigate to the cloned repo's directory
    cd "PATH-TO-DIRECTORY"
  2. Run the indexer.py file (use python if you have created it as an alias for python3)
    python3 indexer.py

This will present you with the following Menu Screen:

Now enter a number corresponding to the given Menu Options:

  1. Search Only: If you have already created the inverted index, you can simply search.
  2. Rebuild Index and Search: If you want to rebuild index, or create it for the first time, and then search. This will ask for a path to the corpus (sample corpora provided).
  3. Exit: Simply Exit the program.

NOTE:
      The Corpora can have subdirectories, path in Menu Option 2 has to be for the root directory. Each Subdirectory will be merged once preprocessed and individual files have been created.

Example Images

  • When a subdirectory is being preprocessed
  • When the inverted index for that subdirectory is being stored
  • Asks for Query
  • Shows documents found, time taken and document names

License

Distributed under the MIT License. See LICENSE for more information.

inverted_indexer's People

Contributors

mosamaasif avatar

Stargazers

 avatar  avatar

Watchers

 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.