Git Product home page Git Product logo

gourmet_search's Introduction

Tasty Search: Search Gourmet food reviews.

Tasty Search is a search engine built on Python (and Django) to search gourmet food reviews data and return the top K (configurable) reviews that have the highest overlap with input query.

Dataset

Required dataset is downloaded from Web data: Amazon Fine Foods reviews

Setting up

  1. Clone the repo.
  2. Create a virtualenv.
  3. Install the requirements.
  4. Perform downsampling the data as per requirement. (Eg: to 100,000 entries.)

Use the below management command:

python manage.py perform_downsize --input_file=assets/foods.txt --count=100000
  • input_file (Mandatory) : File path for gourmet food reviews. (Default value : assets/foods.txt)

  • output_file : Output path for downsized file (If path changes required, to be configured in settings as well. Refer Configurable variables section below) (Default value : assets/food_reviews.json)

  • count : Total reviews expected after downsizing. (Default value : 100000)

  1. Build index of downsized data.

Use the below management command:

python manage.py build_index --input_file=assets/food_reviews.json
  • input_file (Mandatory) : Path to downsized food reviews file. (Default value : assets/food_reviews.json)

  • output_file : Output path for index file. (If path changes required, to be configured in settings as well. Refer Configurable variables section below). (Default value : assets/index.json)

  1. Run the server the usual way (python manage.py runserver) and you are good to go.

Configurable variables.

  • ASSETS_DIR : The directory where data and index is stored.
  • FILES : The location of various assets available.
  • MAX_REVIEWS_COUNT_PER_HIT : Maximum number of reviews returned per search. (Defaulted to 20).

Get the API's on Postman

Click here

Testing

Performed using coverage.

coverage run manage.py test -v 2

Live Demo

Live demo is deployed on heroku. Click here

Sample input : cat coffee cinnamon

Sample Response : Click here

gourmet_search's People

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.