7compass / sentimental Goto Github PK
View Code? Open in Web Editor NEWSimple sentiment analysis with Ruby
License: MIT License
Simple sentiment analysis with Ruby
License: MIT License
Need namespacing
Phrase not bad
usually has neutral or even positive value. But gem doesn't think so ๐
=> analyzer = Sentimental.new
=> #<Sentimental:0x0055b27fc84830 @ngrams=1, @word_scores={}, @influencers={}, @threshold=0, @neutral_regexps=[]>
irb(main):064:0> analyzer.load_defaults
=> {"extremely"=>1.5, "really"=>1.25, "pretty"=>1.01}
irb(main):065:0> analyzer.threshold = 0.1
=> 0.1
irb(main):066:0> analyzer.score("not bad")
=> -1.3088
why dont we take an average of all the scores of the tokens in the sentence as score? its currently calculated as the sum only! if we take average , it will fall between -1 to 1 right?
0.875 ill-mannered
0.5 brutally
0.5 boneheaded
0.5 cynically
0.5 cutthroat
0.5 dishonestly
0.5 dishonestly
I wonder where you got the list?
I've noticed that the size of the text evaluated substantially increases the range of the sentiment scores.
Single sentences will result in a score between -1 and 1, however, multi-line paragraphs can create scores in excess of 10 and -10.
For example, the Gettysburg address produces a score of -4.7, and the latest blog post from positivityblog gets a score of 4.8.
I can't share the texts that I'm seeing scores of 11 and 12 from, unfortunately.
Is this expected behavior? If so, how should I go about normalizing the score so I can compare it to other scores in between -1 and 1?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.