weights.append(np.asarray(sub_list))
sums = [np.sum(x) for x in weights]
return pd.DataFrame({'topic_id': topics, 'weight': sums})
Hierarchical Dirichlet Process Gensim topic number independent of corpus size