A service derived from an old sentiment analysis project. Its pretty cool and you can check it out here or the source behind it here.
To see the API in action follow the documentation on the README or just check it out here
- User GETs to the server
- The engine cross references words to corresponding sentiment values from a modified Corpus
- The corpus was generated using Microsoft Azure. It makes context a bit harder but it let me pre-process everything for much faster lookup
- The server returns a JSON containing sentiment value for the amount of "positiveness" and "negativeness" within the text in terms of a percentage (represented in decimal format)
I wanted to make the api as simple and easy to use as possible. Super barebones but powerful, you can very easily add sentiment analysis to your project
- Simply use the following url. This alone won't get your response though. We need to send in some text first.
www.SentimentAnalysisEngine.com/
- Add the text you want to be analyzed after the last slash (link).
www.SentimentAnalysisEngine.com/I love this API. But Jonathan Smells terrible.
- The server returns a JSON file with the positive and negative sentiment percentages.
{"positive":0.42857142857142855,
"negative":0.5714285714285714}
Running the service locally is really easy. Here's a beginner-friendly guide!
- Make sure you have git installed for your shell. Clone the repo by typing into your terminal:
git clone https://github.com/Jspsun/SentimentAnalysisAPI.git
- First make sure you have Node installed. You can check by typing into your terminal:
node -v
- Navigate to inside wherever the SentimentAnalysisAPI repo is stored in terminal.
- Install all the dependancies in terminal using:
npm install
- Run the node server using:
node app.js
- In your browser go to this link (or to whichever port/address you are using):
http://localhost:1337/
- Add the text you want to be analyzed after the last slash.
http://localhost:1337/Jonathan is such a nice guy for making this guide
- Node.js
- Express
- xmlhttprequest
- Heroku
- If there are any issues, be sure to mark it in the repo and if you can fix it, don't be afraid to make a pull request
- If you like using it, don't forget to credit me (and the repo) in your project README
- I know they don't matter, but starring the project warms my heart <3