Sentiment Analysis of a file (if text inside file contains happy or sad mood?)
The same code is the working for determining your twitter mood at:
http://mytwitmood.tutafuta.com/
perl
To run this perl script all you have to do is:
$perl happyorsad.pl <file name>
it would print output in following format:
This text is so Happy!
Happy: 82.56% :-)
Sad: 17.44% :-(
Created my own dictionary for bigram analysis also used LIWC2007 dictionary from this source
https://code.google.com/p/negotiations-ling773/source/browse/trunk/resources/LIWC2007.dic?r=2
I have added 3 poems as test cases for showing the use and accuracy of the results.
Run using:
perl happyorsad.pl poem1.txt
Output:
This text is so Sad!
Happy: 16.79% :-)
Sad: 83.21% :-(
In case you use this project please cite me using this citation:
Puneet Singh, et al. "Architecture for Automated Tagging and Clustering of Song Files According to Mood." International Journal of Computer Science Issues (IJCSI) 7.4 (2010).
Pennebaker, J.W., Chung, C.K., Ireland, M., Gonzales, A., & Booth, R.J. (2007). The development and psychometric properties of LIWC2007. [Software manual]. Austin, TX (www.liwc.net)