Skip to content

Commit 160ba5f

Browse files
committed
fix dictionary issue
1 parent 71b4f1e commit 160ba5f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

topicnet/demos/20NG-GenSim vs TopicNet.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,10 @@
396396
"outputs": [],
397397
"source": [
398398
"data_dictionary = Dictionary(data_texts)\n",
399-
"data_corpus = [data_dictionary.doc2bow(text) for text in data_texts]\n"
399+
"data_corpus = [data_dictionary.doc2bow(text) for text in data_texts]\n",
400+
"\n",
401+
"# force data_dictionary to initialize\n",
402+
"data_dictionary[0]"
400403
]
401404
},
402405
{

0 commit comments

Comments
 (0)