Skip to main content

Topic modeling with text networks

Project description

Topic Network - topic modeling with text networks

This package introduces a novel method for topic modeling using community detection in complex networks. The algorithms included in the package first create a network of collocated terms, filter out unimportant words based on centrality measures, and then use community detection to reveal the topic groups in the network.

The methods used are language-agnostic, meaning that you can perform the topic modeling on any text in any language.

It is an early version, hence there might be performance issues when modeling big corpora. These are to be resolved in upcoming updates.


To install the current version of the package, use:

pip install topicnetwork


To find the topics, simply use:

import topicnetwork

topics = topicnetwork.find_topics(list_of_strings)

For best results, use a text without punctuation and stopwords, and words converted to lowercase. You can perform the cleaning on your English texts with:

text = topicnetwork.clean(list_of_strings)


Package written and maintained by Michal Pikusa (

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topicnetwork-0.1.4.tar.gz (2.7 kB view hashes)

Uploaded source

Built Distribution

topicnetwork-0.1.4-py3-none-any.whl (2.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page