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::
```python
pip install topicnetwork
```
To find the topics, simply use::
```python
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:
```python
text = topicnetwork.clean(list_of_strings)
```
Package written and maintained by Michal Pikusa (pikusa.michal@gmail.com)
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::
```python
pip install topicnetwork
```
To find the topics, simply use::
```python
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:
```python
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.2.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file topicnetwork-0.1.2.tar.gz
.
File metadata
- Download URL: topicnetwork-0.1.2.tar.gz
- Upload date:
- Size: 2.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c7efbfd90154da623b269a9d721a71c4a62d87261cbc09f71f27711d73be76 |
|
MD5 | ff78aefcc938a3465569864bdbbcf1d4 |
|
BLAKE2b-256 | b242f9f3442c00fb5ef191b09bbdc14f0e6fa28b845384afb20b5bac679819e9 |
File details
Details for the file topicnetwork-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: topicnetwork-0.1.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38722259944ac64d64b8f0bfe60bcc0fe865de0a6fca7e1fedcf29be59736cd5 |
|
MD5 | dde2e8308dc6e022fdcb7cbe63efe9a7 |
|
BLAKE2b-256 | b0a1c08b624f4ace460bd1550e5ef305d50bb24d3b9739015d5cc0638b513b2f |