Created
June 16, 2018 21:15
-
-
Save MarynaLongnickel/91a8a94e38f29d0795acbbd3f53eb0e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
word_matrix = [] | |
for i in lemmatized: word_matrix.append([1 if j in i else 0 for j in top5000]) | |
features = pd.DataFrame(word_matrix, columns = top5000, index = pd.DataFrame(filtered_tokens)) | |
features['sentiment'] = data['sentiment'].values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment