Skip to content

Commit

Permalink
changed decimal places in doc_topics
Browse files Browse the repository at this point in the history
  • Loading branch information
MaVitz committed May 29, 2018
1 parent b7ad4ab commit 08f9594
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dariah_topics/postprocessing.py
Expand Up @@ -247,11 +247,11 @@ def show_document_topics(topics, model=None, document_labels=None, doc_topics_fi

index = [' '.join(keys[:num_keys]) for keys in topics.values]
if isinstance(model, LDA):
return _show_lda_document_topics(model, document_labels, index)
return _show_lda_document_topics(model, document_labels, index).round(4)
elif isinstance(model, LdaModel) or isinstance(model, LdaMulticore):
return _show_gensim_document_topics(doc2bow, model, document_labels, index)
return _show_gensim_document_topics(doc2bow, model, document_labels, index).round(4)
elif doc_topics_file is not None:
return _show_mallet_document_topics(doc_topics_file, index, easy_file_format)
return _show_mallet_document_topics(doc_topics_file, index, easy_file_format).round(4)


def show_topics(model=None, vocabulary=None, topic_keys_file=None, num_keys=10):
Expand Down

0 comments on commit 08f9594

Please sign in to comment.