Slide 1

Slide 1 text

BOOK DUETS MARKOV MASHUPS OF LYRICS AND LITERARY QUOTES LORAINE KANERVISTO @LORAINEKV SHE / HER, THEY / THEM ADA DEVELOPERS ACADEMY STUDENT PROJECT

Slide 2

Slide 2 text

BOOKDUETS.COM

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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.

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

PS. CHECK OUT MY API! HTTPS://GITHUB.COM/LORAINEKV/BOOK-DUETS-API/

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

SHOUTOUTS - MAHALO! ▸ My instructors, Kari and Jeremy @karianneban and @jnf ▸ My classmates, the unigoats 
 (our kickass class mascot) ▸ YOU, the Ruby community!