Skip to content

Commit

Permalink
Undefined name: corpora.Dictionary --> Dictionary
Browse files Browse the repository at this point in the history
To match the import on line 3.
  • Loading branch information
cclauss authored Sep 30, 2018
1 parent 07b94e4 commit 900f5ea
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 900f5ea

Please sign in to comment.