Last active
October 17, 2019 23:09
-
-
Save nchibana/854266cb05afb6f2c9cf62245f4bf925 to your computer and use it in GitHub Desktop.
new lexicon
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
| dict = pd.read_csv('./NRC-VAD-Lexicon-Aug2018Release/NRC-VAD-Lexicon-Aug2018Release/NRC-VAD-Lexicon.txt', sep='\t') | |
| dict['Ranking'] = np.arange(1, len(dict)+1) | |
| columnsTitles = ["Word","Ranking","Arousal","Valence","Dominance"] | |
| dict = dict.reindex(columns=columnsTitles) | |
| dict['Arousal'] = dict['Arousal'].astype(str) | |
| newDict = dict.set_index('Word').T.to_dict('list') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment