GithubHelp home page GithubHelp logo

itssiddharth / context_search Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 79 KB

The functions in the PDF allow you to search efficiently through the PDFs.

License: MIT License

Python 100.00%
nlp context-search pdf-search-engine pip

context_search's Introduction

Context-Search

MIT license PRs Welcome

For source code

This the my Github repo. Contact me for support and PRs are welcome.

Usage

  1. Pip install the package.
$ pip3 install smart-search
  • NOTE : Please have the pickle file in the same folder as the python script in which you will use our pip package.

Here i use the glove.6B.zip file from Standfords Github repository from the hyperlink. Then pickled this model for easier loading. Download it from here

Syntax

  1. Import the library.
>> import smart_search
  1. Create an object of the class, smart_search.model(). Say, functioncaller.
>> functioncaller = smart_search.model()
  1. Now to convert a pdf to a list of lists containing page.no and words after stop word removal, we use the built in function getting_list_of_words(). This accepts 1 argument, i.e the path to the pdf and returns the required list to be fed to the model.
>> pdf_list = functioncaller.getting_list_of_words('path to your pdf')
  1. Pass this list to the model along with the word you want to get the search result of using the perform_skip() function. This accepts 2 variables, i.e the list produced by the previous function and the word you want to search for and retuns the top 5 relevant search locations of the word you searched for.
>> location[0:5] = functioncaller.perform_skip(pdf_list, input_word)
  1. You can use subprocesses library of python to navigate to the page if you want to.

Algorithm

LICENSE

MIT

context_search's People

Contributors

itssiddharth avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

esketch-ai

context_search's Issues

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.