GithubHelp home page GithubHelp logo

elhawlir / devsearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicholaskajoh/devsearch

0.0 0.0 0.0 37 KB

A web search engine built with Python which uses TF-IDF and PageRank to sort search results.

Python 61.17% CSS 2.26% HTML 35.36% Dockerfile 1.22%

devsearch's Introduction

devsearch

A web search engine built with Python which uses TF-IDF and PageRank to sort search results.

Stack

  • Flask (Python 3)
  • Scrapy
  • LXML
  • MongoEngine (MongoDB)
  • Bootstrap 4

Requirements

  • Docker
  • Docker Compose

Setup

  • Install Docker and Docker Compose.
  • Clone or download this repo.
  • Create a .env file from .env.example.
  • Run docker-compose up.

Crawling

  • Update the SPIDER_ALLOWED_DOMAINS variable in .env with domains you want the spider to crawl.
  • Add at least one url to the crawl_list collection (in MongoDB) for the spider to start with.
  • Run docker-compose run web flask crawl to crawl new web pages.
  • You can add the --recrawl option to update pages already crawled: docker-compose run web flask crawl --recrawl True.

Indexing

  • To index crawled pages, run docker-compose run web flask index.
  • To compute TFIDF, run the following one after the other:
    • docker-compose run web flask idf
    • docker-compose run web flask tfidf
  • To compute PageRank, run docker-compose run web flask rank.
  • To compute page-word score, run docker-compose run web flask score.

Deploy

  • Create a .env.secret file from .env.secret.example.
  • Run docker-compose -f docker-compose.prod.yml up --build -d.

devsearch's People

Contributors

nicholaskajoh avatar dependabot-preview[bot] 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.