Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created September 25, 2020 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyasugano/812e1c2656ce81bcf3471d381925eb7c to your computer and use it in GitHub Desktop.
Save yuyasugano/812e1c2656ce81bcf3471d381925eb7c to your computer and use it in GitHub Desktop.
Sentiment analysis with NLTK and Scikit-learn
print('train_tweets shape: {}, label 0: {}, label 1: {}'.format(
train_tweets.shape,
train_tweets[train_tweets['label']==0].count()['label'],
train_tweets[train_tweets['label']==1].count()['label'])
)
# train_tweets shape: (31962, 3), label 0: 29720, label 1: 2242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment