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.3.tar.gz (1.9 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.3-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for narrativegraphs-0.1.3.tar.gz
Algorithm Hash digest
SHA256 607ff24fbeee34374c3573b8a4fbcf28a041abcfc4bc073897e7f859909ac1ef
MD5 6c7ad768393ab9a1537e30b1ff08fa2e
BLAKE2b-256 c553c065be64af63bf00157e0263fb7c0fd3ebfed853f293216702ef4a1df0ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for narrativegraphs-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5f55658713e5000a955083318fd918cace672acc4f2751ebf356a3e2f8879004
MD5 b7027e93ea35e9e8c48de0079f3080de
BLAKE2b-256 053d43226951855f3e89c58e1e513363956753d322b7ab251d33775bb5a9f61f

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