You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: