Code Monkey home page Code Monkey logo

local-search-engine's Introduction

ABOUT

This is a miniature search engine that runs and scans information from the locally stored data on your machine and then indexes the informations into various data structures. Unlike the quintessential crawling, it does a sequential scanning of multiple text documents and does not follow any network or graph of hyperlinks. Hybrid of multiple data structures is used to make the search as efficient as possible. Particularly, multilevel hashmaps and a blend of suffix tries and hashmaps and prefix tries and hashmaps are used. Removal of noise and stopwards in the data as well as the query have also been taken care of during processing.

The query is processed and accordingly information is retrieved from the data structures. The search is entirely based on the words, or more specifically the characters in the query, rather than their actual meaning or context. The relevance of each word in the search results with respect to the closest word in the query is kept inversely proportional to the edit distance between the two words and accordingly the results are sorted and displayed. In case of same relevance, frequency and lexicographic order are checked. The relavance of the search results to the query can be increased by introducing some threshold on the edit distance in the main function, where the final printing is done. Similarly, more stopwords can also be introduced.

Maintain the file naming convention of the text documents. Do not forget to update the number of files to be processed in the main function. The size of hashmaps can also be tweaked accordingly. Pass "#QUIT" as query to terminate the program. 20 input files have also been provided in the repository for demo.
              

local-search-engine's People

Contributors

nnakul 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.