We have some different languages and we need to first do language detection before we can analyse the sentiment of our phrases
# Construct a request response<-POST(cogapi, add_headers(`Ocp-Apim-Subscription-Key`=cogapikey), body=toJSON(mydata))
Now we need to consume our response such that we can add the language code to our existing data.frame. The structure of the response JSON doesn’t play well with others so I use data.table’s nifty
rbindlist. It is a **very good* candidate for
purrrbut I’m not up to speed on that yet.
Check out the whole post; Steph makes it look easy.