shobrook / TypeSense

Chrome extension that analyzes a Messenger conversation's sentiment in real-time
MIT License
7 stars 2 forks source link

Sentiment Analysis Methods #76

Open alichtman opened 6 years ago

alichtman commented 6 years ago

Write a GET request function (like the post request already written) in background.js. It should take in a URL (the endpoint), the payload (messages/credentials), and a callback (a function that does something w/ the response).

After that, write the analyzeSentiment() function that takes in a list of message objects assigns a sign (+/-1) to each emotion category and then sums all the valences. It should return an ordered list of sentiment objects, where each sentiment score is scaled between -100 and 100. Each sentiment object is structured as such: {"sentiment": int(), "message": str(), "received": bool(), "id": int()}