After about a month of on and off development I am proud to say that
Use Algorithmia to get the sentiment of a text string.
Install the algorithmia python module via pip:
pip install algorithmia
Create an account which will automatically generate API keys for you.
Once logged in, head over to the credentials page and grab your key. Then drop that key in the
config.py, like we've been doing all month.
We are going to use the following algorithm in our script:
Note: This algorithm costs about 1 credit per run, and you get 5k credits per month for free and 10k credits upon sign-up.
Link to app repo on Github:
GRAB THE SENTIMENT OF A TEXT:
python sentimental.py -t "I like turtles"
Here is the sentiment of your text: 0.3612
Your text resulted in the following topic: mountains
note: the topic will be used later in another script.