Giter Club home page Giter Club logo

digest's Introduction

Digest

Welcome to Digest. This is an exploration of the Word2Vec algorithm. The goal of this project is to create an API that accepts a block of recipe steps and returns a parsed list of steps. The API is being applied in the app Umami. The process of the project involves downloading a recipe set (RecipeNLG), using Google's Word2Vec algorithm to create word vector mappings, importing mappings into spaCy, calculating average vectors for a set of ingredients and actions and finally using these metrics to determine if a given recipe step is valid from a block of text.

Prerequisites

Local Development

  1. Clone the repo
  2. Create Virtual Environment
  3. Run pip install -r requirements.txt
  4. Run uvicorn main:app --reload

Usage

  1. Git clone latest from repo
  2. Download recipeNLG dataset into data/ folder and unzip into csv format
  3. Run python3 process.py to process the csv into a corpus text
  4. make word2vec algorithm and run the commands according to the instructions ./word2vec -train ../data/directions.txt -output vectors.txt -cbow 0 -size 300 -window 8 -negative 25 -hs 0 -sample 1e-4 -threads 24 -binary 0 -iter 15
  5. Use the generated .txt file to train the spaCy model with python -m spacy init vectors en ./word2vec/vectors.txt ./model
  6. Load the model into main.py and run GET token
  7. Deploy & Enjoy!
    • Run zip -r Digest.zip . -x '.??*' to zip the project
    • Upload zip to Azure with:
    curl -X POST \               
    -H 'Content-Type: application/zip' \
    -u '$DigestAPI' \
    -T Digest.zip \
    https://digestapi.scm.azurewebsites.net/api/zipdeploy
    

digest's People

Contributors

harin329 avatar

Watchers

James Cloos avatar  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.