In :from DeepSentiment import GetSentiment import time grab = GetSentiment.DeepSentiment() grab.run_server() time.sleep(5)
After the server is running, parse the text to deepsentiment function and output would be coming as json format which could be handled by get functions. If you just want the sentiment then get_sentiment should work. If you are looking for specific scores for the text then you can make use of get_sentiment_score function. Don't forget to stop the server if you want to set the port free.
In :result = grab.deepsentiment("amazing place you have here") print(grab.get_sentiment(result)) print(grab.get_sentiment_score(result)) grab.stop_server()
In [ ]: