Skip to main content

A library to generate networks of characters and timelines based on text

Project description

StorylineMapper

StorylineMapper is a Python tool for performing community detection on narrative texts. It uses advanced network analysis techniques to identify and visualize relationships and communities within the text, helping to uncover hidden connections and structures.

Table of Contents

Prerequisites

Before you start, ensure you have the following prerequisites installed on your machine:

  • Python 3.12+: Make sure Python is installed and added to your system's PATH.
  • pip: Python's package installer should also be installed.

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/storylinemapper.git
    cd storylinemapper
    
  2. Install required dependencies::
    pip install -r requirements.txt
    pip install -e .
    python -m spacy download en_core_web_sm
    
  3. Usage:

To run StorylineMapper, use the following command in your terminal:

storylinemapper community-detection "YOUR_TEXT_HERE" --method louvain --output OUTPUT_FILENAME --design-options

Example

Here is an example command to run community detection using the Louvain method and output the results to community_network.html

```bash
storylinemapper community-detection "Dr. Emily Watson, a leading scientist from the Global Institute of Advanced Technologies (GIAT), collaborated with Dr. James Carter from the National Research Institute (NRI) on a groundbreaking quantum computing project..." --method louvain --output community_network.html --design-options

Options

  • --method: Specifies the community detection method to use (e.g., louvain, infomap, etc.). Default is louvain.
  • --output: Specifies the output file name (e.g., community_network.html).
  • --design-options: Adds additional design options to the visualization, such as node shapes, colors, and layouts.

Output

The output file will be an HTML file (community_network.html in the example) containing a visual representation of the detected communities and relationships between entities in the text.

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

storylinemapper-0.3.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storylinemapper-0.3.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file storylinemapper-0.3.0.tar.gz.

File metadata

  • Download URL: storylinemapper-0.3.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for storylinemapper-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3b51913974d9a2c344a331606f1df23e1b12b5be26cbb3eb78893a00c2cad88c
MD5 f4f13e5fde6057aa36a47a8b0b45d675
BLAKE2b-256 1e57ee8f1566913768a6206bf1f7e1b55564be84bcb42c128d3d00b1c7d8d181

See more details on using hashes here.

File details

Details for the file storylinemapper-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for storylinemapper-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81c652a5235dc10aae38bd5acaa2c1babd41b8ba9aae2dc6d8e3a93139ffcb24
MD5 ca30a658b2a572a9d037e8570b593c4d
BLAKE2b-256 2c7ef26d88ba14c01eee2aff24666daeff9988f8c1ed8e33225338476e3497bb

See more details on using hashes here.

Supported by

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