Skip to main content

A package for creating and analyzing narrative graphs from text corpora

Project description

narrativegraphs

Turn a collection of texts into an interactive narrative graph — extract entities, relationships, and explore the structure of your corpus visually.

Installation

pip install narrativegraphs

Quick Start

from narrativegraphs import NarrativeGraph

docs: list[str] = [...]  # your list of documents
model = NarrativeGraph().fit(docs)
model.serve_visualizer()

Open the link in your terminal to explore the graph in your browser:

visualizer-screenshot.png

Features

  • Plug'n'play solution – get started with a few lines of code
  • Interactive browser-based visualizer – no extra dependencies
  • See the original contexts that entities and relations appear in
  • Filter and query the graph by statistics, category, or timestamps
  • Export graph and data to NetworkX and Pandas for custom analyses
  • Customizable pipeline components for different use cases

Documentation

Full documentation and tutorials: kasperfyhn.github.io/narrativegraphs

License

MIT

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

narrativegraphs-0.1.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

narrativegraphs-0.1.1-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file narrativegraphs-0.1.1.tar.gz.

File metadata

  • Download URL: narrativegraphs-0.1.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for narrativegraphs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 07b9d72c7844ef14be74fbf25598da5c98049ab420272e8ce99b4779ac92d3eb
MD5 1364d1a591a0839e0744c7e01e1c8fb7
BLAKE2b-256 574e5cb4aa842c92796c4097d02f939adb55ee855ccc2f454657d97a7e3cb4be

See more details on using hashes here.

File details

Details for the file narrativegraphs-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for narrativegraphs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd957ef4e19d4ef25d2f2b7d6c235fa4ac408d195f1c6801cd9acd7a89aca04e
MD5 abcb51c7c2ade96ed23056abc6945191
BLAKE2b-256 51e3eba7b6a9534dd41cb33c4ef972acf7e46826dd625f94584da79f18a7f017

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