-
-
Save regunathanr/9fd9a0122cb0d42973d5209f15970c67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float Senti_score = (float)0.0; | |
for(int i=0; i < mp_obj.matching_phrases.size()-1;i++) | |
{ | |
String mp_polarity = restTemplate.getForObject(gemfire_phrase_polarity_uri+mp_obj.matching_phrases.get(i), | |
String.class); | |
parseJSON_forscore(mp_polarity); | |
Senti_score = Senti_score + Float.valueOf(ret_senti_score); | |
} | |
if(mp_obj.matching_phrases.size() > 1) | |
{ | |
Senti_score = Senti_score/(mp_obj.matching_phrases.size()-1); | |
} | |
result = message + "Sentiment score:"+Senti_score; | |
return result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment