Datasets:
source_node_id stringlengths 15 48 ⌀ | target_node_id stringlengths 16 48 ⌀ | relationship_type stringclasses 25
values | properties_json stringlengths 2 13.2k ⌀ |
|---|---|---|---|
ep_sea_ser_star_trek_the_next_generation_s04_e01 | act_60db49828a021699 | CONTAINS_ACT | {} |
ep_sea_ser_star_trek_the_next_generation_s04_e01 | act_952d3d9e5724b897 | CONTAINS_ACT | {} |
ep_sea_ser_star_trek_the_next_generation_s04_e01 | act_e93ae6d11adf91d3 | CONTAINS_ACT | {} |
ep_sea_ser_star_trek_the_next_generation_s04_e01 | act_dc2bee914ee545d4 | CONTAINS_ACT | {} |
ep_sea_ser_star_trek_the_next_generation_s04_e01 | act_b6b00f2a79a563fa | CONTAINS_ACT | {} |
writer_michael_piller | ep_sea_ser_star_trek_the_next_generation_s04_e01 | CREDITED_ON | {"credit_position": 1, "group_type": "Individual", "source": "BAML", "is_wga_standard": true, "writer_group": 1, "created_at": "2026-02-27T12:14:40.113196+00:00", "full_credit_line": "Written by Michael Piller", "credit_type": "Written by"} |
writer_michael_piller | ep_sea_ser_star_trek_the_next_generation_s04_e15 | CREDITED_ON | {"credit_position": 1, "group_type": "Individual", "source": "BAML", "is_wga_standard": true, "writer_group": 2, "created_at": "2026-02-28T13:34:56.697712+00:00", "full_credit_line": "Teleplay by Joe Menosky & Ronald D. Moore and Michael Piller", "credit_type": "Teleplay by"} |
act_60db49828a021699 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | PART_OF_EPISODE | {} |
act_60db49828a021699 | scene_527f49b76908498d | CONTAINS_SCENE | {} |
act_60db49828a021699 | scene_73bee5c997fc6d1a | CONTAINS_SCENE | {} |
act_60db49828a021699 | scene_ad73065a5b545f7a | CONTAINS_SCENE | {} |
act_60db49828a021699 | scene_63b4df799a0d070a | CONTAINS_SCENE | {} |
act_60db49828a021699 | scene_051ef5ede79ff262 | CONTAINS_SCENE | {} |
act_952d3d9e5724b897 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | PART_OF_EPISODE | {} |
act_952d3d9e5724b897 | scene_16ef7125ec1ca9e5 | CONTAINS_SCENE | {} |
act_952d3d9e5724b897 | scene_f811a3245783cd07 | CONTAINS_SCENE | {} |
act_952d3d9e5724b897 | scene_d36c07a82a7d0bcd | CONTAINS_SCENE | {} |
act_952d3d9e5724b897 | scene_38c5d9a76d4116cc | CONTAINS_SCENE | {} |
act_952d3d9e5724b897 | scene_c9dbb8800bee0b48 | CONTAINS_SCENE | {} |
act_e93ae6d11adf91d3 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | PART_OF_EPISODE | {} |
act_e93ae6d11adf91d3 | scene_8aad15ed5b97fee4 | CONTAINS_SCENE | {} |
act_e93ae6d11adf91d3 | scene_2e6d4b4534710b83 | CONTAINS_SCENE | {} |
act_e93ae6d11adf91d3 | scene_df94f3eeb122971a | CONTAINS_SCENE | {} |
act_e93ae6d11adf91d3 | scene_55794662772511f7 | CONTAINS_SCENE | {} |
act_e93ae6d11adf91d3 | scene_55d1ca204c936a0a | CONTAINS_SCENE | {} |
act_dc2bee914ee545d4 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | PART_OF_EPISODE | {} |
act_dc2bee914ee545d4 | scene_92e8b7a8180b9b3b | CONTAINS_SCENE | {} |
act_dc2bee914ee545d4 | scene_e1eb0a3d0c4d9604 | CONTAINS_SCENE | {} |
act_dc2bee914ee545d4 | scene_3789dc507e300093 | CONTAINS_SCENE | {} |
act_dc2bee914ee545d4 | scene_37930a92668332c2 | CONTAINS_SCENE | {} |
act_dc2bee914ee545d4 | scene_a340021445be6b4d | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | ep_sea_ser_star_trek_the_next_generation_s04_e01 | PART_OF_EPISODE | {} |
act_b6b00f2a79a563fa | scene_ec75583e9da4dd2a | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | scene_49937d70e4e5552f | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | scene_b5e0accc1bc297c6 | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | scene_bafa60ae773117ee | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | scene_a218ad32de0b1cef | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | scene_928dbff21807296c | CONTAINS_SCENE | {} |
act_b6b00f2a79a563fa | scene_0dc337f04d4c71f8 | CONTAINS_SCENE | {} |
scene_527f49b76908498d | act_60db49828a021699 | PART_OF_ACT | {} |
scene_527f49b76908498d | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_527f49b76908498d | beat_b598a040406d1e77 | CONTAINS_BEAT | {} |
scene_527f49b76908498d | beat_0beec8af57969d78 | CONTAINS_BEAT | {} |
scene_73bee5c997fc6d1a | act_60db49828a021699 | PART_OF_ACT | {} |
scene_73bee5c997fc6d1a | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_73bee5c997fc6d1a | beat_deda1cb02669974e | CONTAINS_BEAT | {} |
scene_73bee5c997fc6d1a | beat_9ebde89445dea537 | CONTAINS_BEAT | {} |
scene_73bee5c997fc6d1a | beat_5e6b92170c069a5e | CONTAINS_BEAT | {} |
scene_ad73065a5b545f7a | act_60db49828a021699 | PART_OF_ACT | {} |
scene_ad73065a5b545f7a | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_ad73065a5b545f7a | beat_61051511c296f00c | CONTAINS_BEAT | {} |
scene_ad73065a5b545f7a | beat_18858d1973194c61 | CONTAINS_BEAT | {} |
scene_ad73065a5b545f7a | beat_25a8df10c9427029 | CONTAINS_BEAT | {} |
scene_63b4df799a0d070a | act_60db49828a021699 | PART_OF_ACT | {} |
scene_63b4df799a0d070a | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_63b4df799a0d070a | beat_ab9411b08faaa1d3 | CONTAINS_BEAT | {} |
scene_63b4df799a0d070a | beat_09a79679e47ae28f | CONTAINS_BEAT | {} |
scene_051ef5ede79ff262 | act_60db49828a021699 | PART_OF_ACT | {} |
scene_051ef5ede79ff262 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_051ef5ede79ff262 | beat_5dc155a704006e33 | CONTAINS_BEAT | {} |
scene_051ef5ede79ff262 | beat_92ce768fbedb2709 | CONTAINS_BEAT | {} |
scene_051ef5ede79ff262 | beat_e242ddd8b910955e | CONTAINS_BEAT | {} |
scene_051ef5ede79ff262 | beat_615155e8ebacf361 | CONTAINS_BEAT | {} |
scene_051ef5ede79ff262 | beat_9ebeb4cf3156303a | CONTAINS_BEAT | {} |
scene_16ef7125ec1ca9e5 | act_952d3d9e5724b897 | PART_OF_ACT | {} |
scene_16ef7125ec1ca9e5 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_16ef7125ec1ca9e5 | beat_e874b2f83c126e34 | CONTAINS_BEAT | {} |
scene_16ef7125ec1ca9e5 | beat_f46b12914fee4ec5 | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | act_952d3d9e5724b897 | PART_OF_ACT | {} |
scene_f811a3245783cd07 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_f811a3245783cd07 | beat_19a152898a0681c4 | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | beat_a7e2b92e2e0f3262 | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | beat_495bb9ccb478530c | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | beat_eac8bc34ba02ca99 | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | beat_00f0cca6a5e1aba3 | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | beat_cd913b6633bd1390 | CONTAINS_BEAT | {} |
scene_f811a3245783cd07 | beat_bc3585d52db8096f | CONTAINS_BEAT | {} |
scene_d36c07a82a7d0bcd | act_952d3d9e5724b897 | PART_OF_ACT | {} |
scene_d36c07a82a7d0bcd | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_d36c07a82a7d0bcd | beat_83d47f2a2bfc5edb | CONTAINS_BEAT | {} |
scene_d36c07a82a7d0bcd | beat_14482b43de5e1f0c | CONTAINS_BEAT | {} |
scene_d36c07a82a7d0bcd | beat_196dad303f5c01b2 | CONTAINS_BEAT | {} |
scene_38c5d9a76d4116cc | act_952d3d9e5724b897 | PART_OF_ACT | {} |
scene_38c5d9a76d4116cc | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_38c5d9a76d4116cc | beat_794719aa587f7c7a | CONTAINS_BEAT | {} |
scene_38c5d9a76d4116cc | beat_c697630d4fe367a8 | CONTAINS_BEAT | {} |
scene_38c5d9a76d4116cc | beat_993143ce361a5ef1 | CONTAINS_BEAT | {} |
scene_38c5d9a76d4116cc | beat_750ba63f6e215a5e | CONTAINS_BEAT | {} |
scene_c9dbb8800bee0b48 | act_952d3d9e5724b897 | PART_OF_ACT | {} |
scene_c9dbb8800bee0b48 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_c9dbb8800bee0b48 | beat_a8f8aabf4144b970 | CONTAINS_BEAT | {} |
scene_c9dbb8800bee0b48 | beat_460f5fcf8433bab5 | CONTAINS_BEAT | {} |
scene_8aad15ed5b97fee4 | act_e93ae6d11adf91d3 | PART_OF_ACT | {} |
scene_8aad15ed5b97fee4 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_8aad15ed5b97fee4 | beat_548d872df53eee89 | CONTAINS_BEAT | {} |
scene_8aad15ed5b97fee4 | beat_6c80c08256f7d826 | CONTAINS_BEAT | {} |
scene_2e6d4b4534710b83 | act_e93ae6d11adf91d3 | PART_OF_ACT | {} |
scene_2e6d4b4534710b83 | ep_sea_ser_star_trek_the_next_generation_s04_e01 | BELONGS_TO_EPISODE | {} |
scene_2e6d4b4534710b83 | beat_54a7d282c3be56a1 | CONTAINS_BEAT | {} |
scene_2e6d4b4534710b83 | beat_43f6ab654afea6c3 | CONTAINS_BEAT | {} |
Star Trek: The Next Generation - Narrative Knowledge Graph
A rich narrative knowledge graph extracted from Star Trek: The Next Generation screenplays using the Fabula pipeline. Contains characters, locations, objects, organizations, events, themes, and conflict arcs with full participation semantics and Graph Gravity importance tiers.
Dataset Overview
| Metric | Value |
|---|---|
| Source database | startrektng.s04 |
| Type | Season database |
| Episodes | 26 |
| Total nodes | 7,936 |
| Total edges | 25,226 |
| Schema version | 1.1.0 |
| Exported | 2026-03-14 |
Entity Breakdown
| Type | Count |
|---|---|
| Act | 132 |
| Agent | 459 |
| ConflictArc | 104 |
| Episode | 26 |
| Event | 1,414 |
| Location | 456 |
| Object | 1,595 |
| Organization | 124 |
| PlotBeat | 2,713 |
| SceneBoundary | 881 |
| Writer | 32 |
Graph Gravity Tiers
| Tier | Count | Description |
|---|---|---|
| anchor | 45 | Main characters / key locations |
| planet | 170 | Recurring entities |
| asteroid | 2,419 | Minor / one-off entities |
Relationship Types
AFFILIATED_WITH, BELONGS_TO_EPISODE, CALLBACK, CAUSAL, CHARACTER_CONTINUITY, CONTAINS_ACT, CONTAINS_BEAT, CONTAINS_SCENE, CREDITED_ON, EMOTIONAL_ECHO, ESCALATION, FORESHADOWING, INVOLVED_IN_ARC, INVOLVED_WITH, IN_EVENT, NARRATIVELY_FOLLOWS, OCCURS_IN, PARTICIPATED_AS, PART_OF, PART_OF_ACT ... and 5 more
Related Datasets
This is a single-season dataset containing entities and events as extracted from Season 4 screenplays.
- Megagraph (all seasons unified): brandburner/startrektng-mega-narrative-kg
Note: The megagraph is not a simple union of season datasets. Cross-season entities are reconciled through a Global Entity Registry (GER), receiving new canonical UUIDs and distilled descriptions. Graph Gravity tiers are recalculated across all episodes. Use individual season datasets for single-season analysis; use the megagraph for cross-season analysis.
Files
| File | Description |
|---|---|
nodes.parquet |
All graph nodes with properties |
edges.parquet |
All relationships with properties |
positions.parquet |
3D layout coordinates for visualization |
meta.json |
Dataset metadata and entity counts |
Schema
Nodes (nodes.parquet)
| Column | Type | Description |
|---|---|---|
node_id |
string | Unique node identifier (UUID) |
primary_label |
string | Node type (Agent, Location, Event, etc.) |
name |
string | Display name |
description |
string | Foundational description |
tier |
string (nullable) | Graph Gravity tier: anchor / planet / asteroid |
episode_count |
int (nullable) | Number of distinct episodes entity appears in |
first_episode_seq |
int (nullable) | First appearance episode |
last_episode_seq |
int (nullable) | Last appearance episode |
properties_json |
string | Full node properties as JSON |
Edges (edges.parquet)
| Column | Type | Description |
|---|---|---|
source_node_id |
string | Source node UUID |
target_node_id |
string | Target node UUID |
relationship_type |
string | Relationship type (e.g., PARTICIPATED_AS) |
properties_json |
string | Edge properties as JSON |
Positions (positions.parquet)
| Column | Type | Description |
|---|---|---|
node_id |
string | Node UUID |
x, y, z |
float | 3D coordinates |
size |
float | Node size (Graph Gravity weighted) |
r, g, b |
int | RGB color by entity type |
community |
int | Louvain community index |
tier |
string (nullable) | Graph Gravity tier |
Usage
from datasets import load_dataset
import pandas as pd
# Load from HuggingFace
ds = load_dataset("brandburner/startrektng-s04-narrative-kg")
# Or load parquet directly
nodes = pd.read_parquet("nodes.parquet")
edges = pd.read_parquet("edges.parquet")
# Filter to anchor characters
anchors = nodes[(nodes['primary_label'] == 'Agent') & (nodes['tier'] == 'anchor')]
# Build a NetworkX graph
import networkx as nx
G = nx.DiGraph()
for _, n in nodes.iterrows():
G.add_node(n['node_id'], label=n['primary_label'], name=n['name'])
for _, e in edges.iterrows():
G.add_edge(e['source_node_id'], e['target_node_id'], type=e['relationship_type'])
Citation
@misc{fabula_startrektng_s04,
title = {Star Trek: The Next Generation Narrative Knowledge Graph},
author = {Fabula Pipeline},
year = {2026},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/datasets/brandburner/startrektng-s04-narrative-kg}}
}
License
CC BY-SA 4.0
- Downloads last month
- 51