Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Book Duets

Book Duets

Capstone project presentation delivered at RubyConf 2015 during the lightning talk session

Loraine Kanervisto

November 18, 2015
Tweet

More Decks by Loraine Kanervisto

Other Decks in Programming

Transcript

  1. BOOK DUETS MARKOV MASHUPS OF LYRICS AND LITERARY QUOTES LORAINE

    KANERVISTO @LORAINEKV SHE / HER, THEY / THEM ADA DEVELOPERS ACADEMY STUDENT PROJECT
  2. WHAT IS IT? / USER PERSONAS ▸ Book Duets is

    an API and a web app made for the amusement and curiosity of music and literature fans. Through Book Duets, you can create unique mashups of literary works and lyrics and explore trivia about author-musician pairings throughout history. ▸ For book nerds, language nerds, music nerds
  3. WHAT’S A MARKOV CHAIN? ▸ Probability distribution ▸ Determines the

    next state by looking at the current state. For mashups, this means the next word is determined by looking at the current word.
  4. MY TECH STACK ▸ Ruby on Rails ▸ Redis ▸

    Heroku ▸ Postgres ▸ Gems ▸ Marky Markov ▸ Sanitize ▸ language_filter ▸ Testing ▸ rspec ▸ mock redis ▸ VCR API.BOOKDUETS.COM SECURE PUBLIC API BOOKDUETS.COM WEB APP ▸ Ruby on Rails ▸ AWS Elastic Beanstalk ▸ Mandrill (mailer service) ▸ Postgres ▸ Gems ▸ bcrypt ▸ omniauth (identity and twitter) ▸ bootstrap-sass ▸ Testing ▸ rspec ▸ VCR ▸ factory-girl
  5. REDIS CACHING ▸ Problem: Slow mashups. Building a lyrical corpus

    required 6 API calls (lyric database copyright restrictions) ▸ Solution: Caching corpora for future use with Redis
  6. MASHUP FACTORY ▸ Book Duets API receives author and musician

    names ▸ Builds lyrical and literary corpora by collecting texts from Musixmatch and Wikiquote API ▸ Passes corpora to Marky Markov gem, which builds a Markov chain dictionary ▸ A Book Duet is created! HOW A CUSTOM BOOK DUET IS MADE
  7. SHOUTOUTS - MAHALO! ▸ My instructors, Kari and Jeremy @karianneban

    and @jnf ▸ My classmates, the unigoats 
 (our kickass class mascot) ▸ YOU, the Ruby community!