Created
February 8, 2019 19:01
-
-
Save HarshSingh16/f65710d86e3210ad327b68cf678e6367 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
#SETTING A THRESHOLD AND MAPPING EACH WORD TO A UNIQUE INTEGER | |
threshold=20 | |
word_number=0 | |
dict_word2integer={} | |
for word,frequency in word2count.items(): | |
if frequency>20: | |
dict_word2integer[word]=word_number | |
word_number+=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment