daily pastebin goal
30%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ...
  2.  
  3. // Text for sentiment analysis
  4. const positiveText =
  5.   'I am incredibly happy today! It may be the best day ever!';
  6. const negativeText =
  7.   "Oh no, it's Monday. My alarm didn't go off! I have a presentation in afew minutes. This is really bad.";
  8.  
  9. // Format for Cloud Natural Language API
  10. const positiveDocument = {
  11.   type: 'PLAIN_TEXT',
  12.   content: positiveText,
  13. };
  14.  
  15. const negativeDocument = {
  16.   type: 'PLAIN_TEXT',
  17.   content: negativeText,
  18. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top