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.

Usage

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.

Source Distribution

topicnetwork-0.1.3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

topicnetwork-0.1.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file topicnetwork-0.1.3.tar.gz.

File metadata

  • Download URL: topicnetwork-0.1.3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for topicnetwork-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1abbca49068fa2e1899256f89a9c94ad14383294d13b5686d973d732a76239fd
MD5 7e7e325214dea23cba98f1e80ffe6a19
BLAKE2b-256 aa87a8a063553d0b6f3f9e222d743f4505f63c001ad4e7f1ec086a95a2908b4a

See more details on using hashes here.

File details

Details for the file topicnetwork-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: topicnetwork-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for topicnetwork-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f30965cb134293143439600cefaaeb6281686b8c1a6ff749d698a6feb76e805e
MD5 69bee390bc72dc2488450c0d69ee947a
BLAKE2b-256 8c1ef492699eb522f1523e92d000b10ec5e5f779b282fa13b1a0c78f996a4472

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page