Skip to main content

A package for creating and analyzing narrative graphs from text corpora

Reason this release was yanked:

Bad release. Missing frontend components.

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.2.tar.gz (709.3 kB 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.2-py3-none-any.whl (57.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: narrativegraphs-0.1.2.tar.gz
  • Upload date:
  • Size: 709.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for narrativegraphs-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ee9affd6ef52e470452f81a83f34cccd8eef612fce55900c692ee56323267036
MD5 b57664f424ac96a92b16d919c27fcb1f
BLAKE2b-256 68e44671bc79da1a2ca3a595ead393fe56f3c86bf458fc5c0eb45246a56fa4c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for narrativegraphs-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eef97955c4d074840ceb69fdee5d9d1c6620e6872b639f5224622dc7d6a9e0b6
MD5 c61ed751d1a774457f3abc0cdca27a7a
BLAKE2b-256 b1c916615eb6532413f505a44b0b4f7e3d13df06132e927aea26d72d86b17eaf

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