dariah.core package

Submodules

dariah.core.modeling module

dariah.topics.modeling

This module implements low-level LDA modeling functions.

class dariah.core.modeling.LDA(num_topics, num_iterations=1000, alpha=0.1, eta=0.01, random_state=None, mallet=None)

Bases: object

document_similarities

Document similarity matrix.

fit(dtm)

Fit the LDA model.

topic_document

Topic-document distributions.

topic_similarities

Topic similarity matrix.

topic_word

Topic-word distributions.

topics

Topics with 200 top words.

dariah.core.utils module

dariah.topics.utils

This module implements helper functions for topic modeling.

dariah.core.utils.read_topics_file(path)

Read a MALLET topics file.

dariah.core.visualization module

dariah.topics.visualization

class dariah.core.visualization.Vis(model)

Bases: object

document(name, color='grey', **kwargs)
document_similarities(cmap='Blues', annot=False, fmt='.2g', cbar=True, **kwargs)
topic(name, num_words=10, color='grey', **kwargs)
topic_document(cmap='Blues', annot=False, fmt='.2g', cbar=True, **kwargs)
topic_similarities(cmap='Blues', annot=False, fmt='.2g', cbar=True, **kwargs)
topic_word(words, cmap='Blues', annot=False, fmt='.2g', cbar=True, **kwargs)

Module contents