title: Go language sentiment analysis
body: <p>I'm using the following library to perform some sentiment analysis of Facebook posts on my feed as an experiment for a bit of fun: <a href="https://github.com/cdipaolo/sentiment" rel="nofollow">https://github.com/cdipaolo/sentiment</a></p>
  
  <p>But the problem I'm facing is that the Analysis object that is returned from the model.SentimentAnalysis() call doesn't have a weighted score. The score value it returns for the sentence is either 0 or 1. This makes it too vaguely defined, and I'd like to have a scale of sentiment for each Facebook post, so a float from 0.0-1.0 would be ideal where 1 is 100% positive and 0 is 100% negative.</p>
  
  <p>Is there a way I can utilize the Words variable in the object (in this file you can see it down the bottom <a href="https://github.com/cdipaolo/sentiment/blob/master/model.go" rel="nofollow">https://github.com/cdipaolo/sentiment/blob/master/model.go</a>) to loop over each of the word scores in the sentence to create my own weighted sentiment score? For example, would something like positive_words / total_words work? That would give me a number representing what percentage of positive sentiment the post is, but then the weighting problem comes back into it again because the words aren't weighted either, so for example say I got back a score of 0.75, in reality the true score could be a lot less because the words may have only very slightly been above the positive threshold but I don't know that because it's only either a 0 for negative or a 1 for positive, it's not a weighted float value.</p>
  
  <p>So my question here is, is there some way mathematically that I can create my own weight score given the data that is provided, or do I not have enough data to do this? </p>