Created
January 17, 2020 04:32
-
-
Save wandabwa2004/d3194d28a1452bd278f2d22e913aaf6e to your computer and use it in GitHub Desktop.
This file contains 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
##Bigrams models for each quarter. | |
bigram_q1 = gensim.models.Phrases(data_words_q1, min_count=3, threshold=100) # higher threshold fewer phrases. | |
bigram_q2 = gensim.models.Phrases(data_words_q2, min_count=3, threshold=100) # higher threshold fewer phrases. | |
bigram_q3 = gensim.models.Phrases(data_words_q3, min_count=3, threshold=100) # higher threshold fewer phrases. | |
bigram_q4 = gensim.models.Phrases(data_words_q4, min_count=3, threshold=100) # higher threshold fewer phrases. | |
# Faster way to get a sentence clubbed as a bigram | |
bigram_mod_q1 = gensim.models.phrases.Phraser(bigram_q1) | |
bigram_mod_q2 = gensim.models.phrases.Phraser(bigram_q2) | |
bigram_mod_q3 = gensim.models.phrases.Phraser(bigram_q3) | |
bigram_mod_q4 = gensim.models.phrases.Phraser(bigram_q4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment