Skip to main content

Automated text analysis with networks

Project description

Travis-CI Status Documentation Status Python Dependency Freshness Latest DOI so you can please cite this software

textnets represents collections of texts as networks of documents and words. This provides novel possibilities for the visualization and analysis of texts.

Bipartite network graph

Network of U.S. Senators and words used in their official statements following the acquittal vote in the Senate impeachment trial (source).

This is a Python implementation of Chris Bail’s textnets package for R. It is free software under the terms of the GNU General Public License v3.

The idea underlying textnets is presented in this paper:

Christopher A. Bail, “Combining natural language processing and network analysis to examine how advocacy organizations stimulate conversation on social media,” Proceedings of the National Academy of Sciences of the United States of America 113, no. 42 (2016), 11823–11828, doi:10.1073/pnas.1607151113.


textnets builds on the state-of-the-art library spacy for natural-language processing and igraph for network analysis. It uses the Leiden algorithm for community detection, which is able to perform community detection on the bipartite (word–group) network.

textnets seamlessly integrates with pandas and other parts of Python’s excellent scientific stack. That means that you can use textnets in Jupyter notebooks to analyze and visualize your data!

Read the documentation to find out more about the package’s features.

Learn More



Issues & Ideas




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

textnets-0.4.3.tar.gz (26.6 kB view hashes)

Uploaded Source

Built Distribution

textnets-0.4.3-py2.py3-none-any.whl (15.2 kB view hashes)

Uploaded Python 2 Python 3

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