Thanks for making the tutorial, coderasha. I currently following your tutorial, and I think I found some typo in this part :
tf_idf = gensim.models.TfidfModel(corpus) for doc in tfidf[corpus]: print([[mydict[id], np.around(freq, decimals=2)] for id, freq in doc])
probably the "mydict" variable is typo, so I changed to "dictionary" based on previous line declaration and the code works.
Please verify this, Thanks
Oh, I see. Yes, there is a typo in that part. Thank you for your attention :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for making the tutorial, coderasha. I currently following your tutorial, and I think I found some typo in this part :
tf_idf = gensim.models.TfidfModel(corpus)
for doc in tfidf[corpus]:
print([[mydict[id], np.around(freq, decimals=2)] for id, freq in doc])
probably the "mydict" variable is typo, so I changed to "dictionary" based on previous line declaration and the code works.
Please verify this, Thanks
Oh, I see. Yes, there is a typo in that part. Thank you for your attention :)