Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -89,7 +89,7 @@ lsa=gensim.models.lsimodel.LsiModel(corpus, id2word=dictionary, | ... | @@ -89,7 +89,7 @@ lsa=gensim.models.lsimodel.LsiModel(corpus, id2word=dictionary, |
89 | num_topics=n_topics) | 89 | num_topics=n_topics) |
90 | # Print the n topics in our corpus: | 90 | # Print the n topics in our corpus: |
91 | #lsa.print_topics(n_topics) | 91 | #lsa.print_topics(n_topics) |
92 | -f=open("topics_file.txt","wb") | 92 | +f=open("topics_file.txt","w") |
93 | f.write("-------------------------------------------------\n") | 93 | f.write("-------------------------------------------------\n") |
94 | for t in lsa.show_topics(num_words=200): | 94 | for t in lsa.show_topics(num_words=200): |
95 | f.write("%s\n" % str(t)) | 95 | f.write("%s\n" % str(t)) | ... | ... |
-
Please register or login to post a comment