Skip to main content

Topic modeling with text networks

Project description

Topic Network - topic modeling with text networks
--------

This package builds a text network out of a list of strings, picks the most important words on the basis of betweenness centrality measure, and performs community detection to group the words into topic networks and return the groups. The methods used are language-agnostic, meaning that you can perform the topic modeling on any text in any language.
The package uses NetworkX to build the network and perform the necessary calculations.

To install 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 (pikusa.michal@gmail.com)

Project details


Download files

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

Files for topicnetwork, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size topicnetwork-0.1-py3-none-any.whl (2.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size topicnetwork-0.1.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

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