For each of the sentence fragments below use your natural language processing algorithm to predict the next word in the sentence.
The guy in front of me just bought a pound of bacon, a bouquet, and a case of
pretzels
cheese
beer
soda
## [1] "The guy in front of me just bought a pound of bacon, a bouquet, and a case of pretzels"
## [1] 0.6
## [1] "The guy in front of me just bought a pound of bacon, a bouquet, and a case of cheese"
## [1] 13.6
## [1] "The guy in front of me just bought a pound of bacon, a bouquet, and a case of beer"
## [1] 26.8
## [1] "The guy in front of me just bought a pound of bacon, a bouquet, and a case of soda"
## [1] 2.6
Answer: beer
You re the reason why I smile everyday. Can you follow me please? It would mean the
world
best
most
universe
## [1] "You re the reason why I smile everyday. Can you follow me please? It would mean the world"
## [1] 90.8
## [1] "You re the reason why I smile everyday. Can you follow me please? It would mean the best"
## [1] 102
## [1] "You re the reason why I smile everyday. Can you follow me please? It would mean the most"
## [1] 32
## [1] "You re the reason why I smile everyday. Can you follow me please? It would mean the universe"
## [1] 4.3
Answer: world
Hey sunshine, can you follow me and make me the
bluest
happiest
smelliest
saddest
## [1] "Hey sunshine, can you follow me and make me the bluest"
## [1] 0.1
## [1] "Hey sunshine, can you follow me and make me the happiest"
## [1] 0.6
## [1] "Hey sunshine, can you follow me and make me the smelliest"
## [1] 0
## [1] "Hey sunshine, can you follow me and make me the saddest"
## [1] 0.3
Answer: happiest
Very early observations on the Bills game: Offense still struggling but the
players
defense
referees
crowd
## [1] "Very early observations on the Bills game: Offense still struggling but the players"
## [1] 28.1
## [1] "Very early observations on the Bills game: Offense still struggling but the defense"
## [1] 14.3
## [1] "Very early observations on the Bills game: Offense still struggling but the referees"
## [1] 0.3
## [1] "Very early observations on the Bills game: Offense still struggling but the crowd"
## [1] 13
Answer: defense
Go on a romantic date at the
movies
mall
grocery
beach
## [1] "Go on a romantic date at the movies"
## [1] 9.5
## [1] "Go on a romantic date at the mall"
## [1] 4.8
## [1] "Go on a romantic date at the grocery"
## [1] 3.8
## [1] "Go on a romantic date at the beach"
## [1] 16.8
Answer: beach
Well I’m pretty sure my granny has some old bagpipes in her garage I’ll dust them off and be on my
motorcycle
way
horse
phone
## [1] "Well I'm pretty sure my granny has some old bagpipes in her garage I'll dust them off and be on my motorcycle"
## [1] 2.6
## [1] "Well I'm pretty sure my granny has some old bagpipes in her garage I'll dust them off and be on my way"
## [1] 159.3
## [1] "Well I'm pretty sure my granny has some old bagpipes in her garage I'll dust them off and be on my horse"
## [1] 7
## [1] "Well I'm pretty sure my granny has some old bagpipes in her garage I'll dust them off and be on my phone"
## [1] 27.5
Answer: way
Ohhhhh #PointBreak is on tomorrow. Love that film and haven’t seen it in quite some
time
thing
years
weeks
## [1] "Ohhhhh #PointBreak is on tomorrow. Love that film and haven't seen it in quite some time"
## [1] 309.6
## [1] "Ohhhhh #PointBreak is on tomorrow. Love that film and haven't seen it in quite some thing"
## [1] 75
## [1] "Ohhhhh #PointBreak is on tomorrow. Love that film and haven't seen it in quite some years"
## [1] 172.3
## [1] "Ohhhhh #PointBreak is on tomorrow. Love that film and haven't seen it in quite some weeks"
## [1] 44.9
Answer: time
After the ice bucket challenge Louis will push his long wet hair out of his eyes with his little
ears
eyes
toes
fingers
## [1] "After the ice bucket challenge Louis will push his long wet hair out of his eyes with his little ears"
## [1] 3
## [1] "After the ice bucket challenge Louis will push his long wet hair out of his eyes with his little eyes"
## [1] 24.2
## [1] "After the ice bucket challenge Louis will push his long wet hair out of his eyes with his little toes"
## [1] 1.7
## [1] "After the ice bucket challenge Louis will push his long wet hair out of his eyes with his little fingers"
## [1] 5.3
Answer: fingers
Be grateful for the good times and keep the faith during the
worse
bad
hard
sad
## [1] "Be grateful for the good times and keep the faith during the worse"
## [1] 12.5
## [1] "Be grateful for the good times and keep the faith during the bad"
## [1] 48.2
## [1] "Be grateful for the good times and keep the faith during the hard"
## [1] 53.8
## [1] "Be grateful for the good times and keep the faith during the sad"
## [1] 14.4
Answer:bad
If this isn’t the cutest thing you’ve ever seen, then you must be
asleep
callous
insane
insensitive
## [1] "If this isn't the cutest thing you've ever seen, then you must be asleep"
## [1] 4
## [1] "If this isn't the cutest thing you've ever seen, then you must be callous"
## [1] 0.2
## [1] "If this isn't the cutest thing you've ever seen, then you must be insane"
## [1] 3.5
## [1] "If this isn't the cutest thing you've ever seen, then you must be insensitive"
## [1] 0.1
Answer: asleep