Skip to content

Commit

Permalink
Merge pull request apachecn#454 from cclauss/patch-1
Browse files Browse the repository at this point in the history
Undefined name: corpora.Dictionary --> Dictionary
  • Loading branch information
jiangzhonglian authored Sep 30, 2018
2 parents 07b94e4 + 900f5ea commit 9a44c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py3.x/nlp/6.LDA/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
line = line.split()
train.append([w for w in line if w not in stopwords])

dictionary = corpora.Dictionary(train)
dictionary = Dictionary(train)
corpus = [dictionary.doc2bow(text) for text in train]
lda = LdaModel(corpus=corpus, id2word=dictionary, num_topics=100)

0 comments on commit 9a44c6d

Please sign in to comment.