abromberg / sentiment_analysis_python Goto Github PK
View Code? Open in Web Editor NEWWorking with sentiment analysis in Python.
Home Page: http://andybromberg.com/sentiment-analysis-python
Working with sentiment analysis in Python.
Home Page: http://andybromberg.com/sentiment-analysis-python
Hi,
I ran your program and found something that you may want to work on it ;)
when you are selecting the best features you should not look into your test data. It will look like your program is cheating :D
I did the same mistake once and i was very happy that my small program is beating all state of the art classification algorithms of the world.
Good Program though.
I am getting the following error , can you please help ?
TypeError Traceback (most recent call last)
in ()
60 #tries using all words as the feature selection mechanism
61 print 'using all words as features'
---> 62 evaluate_features(make_full_dict)
63
64 #scores words based on chi-squared test to show information gain (http://streamhacker.com/2010/06/16/text-classification-sentiment-analysis-eliminate-low-information-features/)
in evaluate_features(feature_select)
14 #http://stackoverflow.com/questions/367155/splitting-a-string-into-words-and-punctuation
15 #breaks up the sentences into lists of individual words (as selected by the input mechanism) and appends 'pos' or 'neg' after each list
---> 16 with open(RT_POLARITY_POS_FILE, 'r') as posSentences:
17 for i in posSentences:
18 posWords = re.findall(r"[\w']+|[.,!?;]", i.rstrip())
TypeError: coercing to Unicode: need string or buffer, RDD found
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.