Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tweets_mix = []
- for i, row in enumerate(sentence_snowstemmeed):
- all_row = ""
- for sent in row:
- all_row += sent
- Tweets_mix.append(all_row)
- tfidf_model = TfidfVectorizer(max_df=0.8, max_features=1000,
- min_df=0.2, stop_words='english',
- use_idf=True, tokenizer=None, ngram_range=(1,1))
- tfidf_matrix = tfidf_model.fit_transform(Tweets_mix) #fit the vectorizer to synopses
- print ("In total, there are " + str(tfidf_matrix.shape[0]) + \
- " synoposes and " + str(tfidf_matrix.shape[1]) + " terms.")
Add Comment
Please, Sign In to add comment