Skip to main content

cjm-transcript-correction-core

A frontend-agnostic core for the transcript correction workflow — the first downstream graph-extension core; composes the graph-storage capability worker into a headless pipeline that applies unified, non-destructive corrections (text, punctuation, segmentation) as a supersede-able overlay on a committed decomposition spine, recomputes the review worklist from deterministic signals, and exposes a CLI as its first driver.

Modules

  • cjm_transcript_correction_core.cli — The CLI driver — the correction core's first (and currently only) frontend. run corrects the committed spine in the decomp graph DB, pointing the graph worker at that shared DB via load-time config, with optional session resume/reopen; review runs the interactive text-correction loop (the cross-transcriber diff is intra-graph since stage 5).
  • cjm_transcript_correction_core.graph — The correction overlay's graph I/O: targeted (scale-shaped) reads of a committed spine via the graph-storage query action, construction of Correction / CorrectionSession nodes + CORRECTS / SUPERSEDES / DERIVED_FROM / REVIEWED edges, the in-core effective-spine projection (layer-0 + applied corrections), and commit through the job queue. Hand-rolled (revolution-1) = direct CR-18 spec material; append-only on layer-0 (never update/delete a Segment).
  • cjm_transcript_correction_core.journal — Live append-through for the correction verbs — the workflow journal's domain half.
  • cjm_transcript_correction_core.models — Overlay data shapes for the transcript-correction workflow: the Correction / CorrectionSession graph nodes + their relation registry, the read view of a committed spine segment, the worklist item, run configuration, and the correction run manifest (proto-bundle that chains decomp -> correction).
  • cjm_transcript_correction_core.pipeline — The headless correction workflow: load a decomp run manifest, resolve the shared graph DB, start/resume/reopen a CorrectionSession, recompute the worklist from deterministic signals + persisted review state, run the D14 empty-segment prune (first operation), and record a chainable correction run manifest — with a cheapest-form HITL approval seam.
  • cjm_transcript_correction_core.signals — Pure deterministic Tier-1 signal functions (no capability calls): empty-segment detection, bidirectional boundary punctuation/capitalization heuristics, forced-alignment coverage flags, positional cross-transcriber diff, and phonetic + edit-distance variant clustering. The worklist is recomputed from these each session; revolution-1 builds ZERO new capabilities.

API

cjm_transcript_correction_core.cli

  • build_parser function — Build the CLI parser (subcommands: run, review).
  • load_capabilities function — Discover manifests + load each capability, passing per-capability config (CR-2 caller-wins).
  • main function — CLI entry point (console script: cjm-transcript-correction-core).
  • review_command function — Execute the review subcommand: interactive text corrections over the flagged worklist.
  • run_command function — Execute the run subcommand: correct a decomp manifest's committed spine.
  • stats_command function — Execute the stats subcommand: flywheel accounting over the shared graph.

cjm_transcript_correction_core.graph

  • active_corrections function — Filter to the effective correction set (the layer's resolve_active over a read superseded set).
  • active_speaker_assignments function — Project the ACTIVE speaker assignment per segment (latest-wins).
  • aggregate_session_purposes function — Fold sessions into a per-source purpose mix (pure; d915d545 picker rung).
  • apply_chunk_inserts function — Synthesize inserted chunks into the effective spine (DEC 3d3fa2a8).
  • apply_time_nudges function — Apply timing corrections onto segment times (latest-wins per edge).
  • build_boundary_shift_correction function — Build a grouping Correction that moves text across one segment boundary.
  • build_chunk_insert_correction function — Build an insertion Correction that adds a chunk the skeleton never cut (DEC 3d3fa2a8).
  • build_chunk_split_corrections function — Compose a chunk SPLIT from the EXISTING verbs (work item 99c1d2ba) — no
  • build_correction_node function — Construct a Correction overlay node (pure; commit happens separately).
  • build_mark_correction function — Build a NON-MUTATING mark Correction (DEC 2a231843: routed attention).
  • build_prune_amendment function — Build a grouping Correction that supersedes a prune with a REDUCED set (unprune).
  • build_prune_correction function — Build one batch grouping Correction that prunes empty segments (D14).
  • build_reject_review function — Build a review Correction that REJECTS a prior correction (reject-as-supersede).
  • build_speaker_assign_correction function — Build a speaker Correction — the assignment op envelope (DEC d6df3a8e).
  • build_text_correction function — Build a text_content Correction + its CORRECTS (+ optional SUPERSEDES) edges.
  • build_time_nudge_correction function — Build a timing Correction that nudges segment boundary TIMES (node + CORRECTS edges).
  • commit_boundary_shift_correction function — Commit a boundary-shift correction (node + CORRECTS x2 [+ SUPERSEDES]) + REVIEWED markers on both segments.
  • commit_chunk_insert_correction function — Commit a chunk insertion (node + CORRECTS per flank).
  • commit_chunk_insert_removal function — Remove an inserted chunk WITHOUT touching layer-0 (reject-as-supersede).
  • commit_chunk_split_correction function — Commit a chunk split: three composed nodes in ONE atomic batch + ONE journal op.
  • commit_chunk_split_removal function — UNSPLIT: remove a split's right half AND its whole group (one review
  • commit_mark_correction function — Commit a mark (node + CORRECTS per anchored segment [+ SUPERSEDES]).
  • commit_mark_dismissal function — Dismiss an open mark WITHOUT a correction (reject-as-supersede).
  • commit_nodes_edges function — Commit overlay nodes/edges through the layer's idempotent extend_graph.
  • commit_prune_amendment function — Commit an unprune amendment (node + DERIVED_FROM edges + SUPERSEDES).
  • commit_speaker_assign_correction function — Commit a speaker assignment (node + CORRECTS per segment + ASSIGNS).
  • commit_speaker_entity function — Mint a source-spanning Entity into the shared registry (DEC 4ec6a49c).
  • commit_text_correction function — Commit a text_content correction (node + CORRECTS [+ SUPERSEDES]) + a REVIEWED marker.
  • commit_time_nudge_correction function — Commit a time-nudge correction (node + CORRECTS per touched segment).
  • correction_stats function — Fold one Source's ACTIVE overlay into flywheel-accounting counts (pure).
  • corrections_to_edits function — Map this core's Correction payloads onto the layer's spine-edit vocabulary.
  • count_source_segments function — Count a Source's segments server-side under its chosen rendition + skeleton (typed count mode).
  • find_active_text_correction function — Single-segment convenience over the batch read (cross-session; latest wins).
  • find_active_text_corrections_batch function — Active text corrections for MANY segments in TWO round-trips (C17).
  • find_chunk_split_group function — Resolve a split right-half's GROUP — the ac84360a group marker cashed in.
  • find_corrections_for_session function — List corrections recorded in a session (typed property filter).
  • find_prior_corrections_by_hash function — Cross-transcript correction-cache lookup (targeted; the graph IS the lexicon).
  • get_session function — Fetch a CorrectionSession node by id (resume/reopen) — typed get, dict shape preserved.
  • list_source_spines function — The SPINES coexisting under a Source's chosen rendition (DEC f1024568).
  • list_speaker_entities function — Read the source-spanning entity registry (the picker's registry tier).
  • load_empty_segments function — Load ONLY a Source's empty-text segments under its chosen rendition (D14 prune).
  • load_review_markers function — Load a session's review markers (typed edge projection over REVIEWED edges).
  • load_source_corrections function — Load every Correction targeting a Source (across sessions) + the superseded-id set.
  • load_source_segments function — Load a Source's fine Segment spine under its chosen rendition + skeleton (typed query surface).
  • load_variant_texts function — Resolve per-transcriber chunk texts from the segments' CharSlice refs.
  • mark_anchor_segments function — Validate a mark anchor and list the Segment ids it touches.
  • open_marks function — Filter to the OPEN marks — the pass-2 worklist ('query open marks, walk them').
  • project_effective_spine function — Project the effective spine = layer-0 + applied corrections.
  • reanchor_span function — Re-locate a span anchor in text that may have been edited since mark time.
  • record_review_markers function — Persist per-(session, segment) review markers as REVIEWED edges.
  • rename_speaker_entity function — Rename an Entity on its STABLE id — identification IS a rename (DEC 484e2d74).
  • resolve_source_renditions function — Pick the AudioRendition set whose fine Segment spine correction operates on.
  • session_purposes_by_source function — Read every CorrectionSession once and fold the per-source purpose mix.
  • set_session_purpose function — Update a session's purpose + updated_at (the test-session hygiene tag, DEC c86714a4).
  • set_session_status function — Update a session's status + updated_at.
  • source_audio_segment_ids function — The Source's coarse spine (one small typed read; ordered by index).
  • spine_where_for function — Resolve a skeleton selector against the observed spine set (pure).
  • start_session function — Create + commit a new CorrectionSession node.
  • submit_and_wait function — Submit one capability job, wait for it, return its result (raise on failure).

cjm_transcript_correction_core.journal

  • correction_replay_handlers function — The correction core's registered replay vocabulary (replay stays DOMAIN-OWNED).
  • journal_correction_op function — Append one correction op — envelope + semantic args + the EXACT wires committed.
  • segment_anchor function — The run-independent anchor stamped on every correction op (DEC ccbab9f5 point 5).

cjm_transcript_correction_core.models

  • Correction class — A single non-destructive correction over the committed spine (overlay node).
  • CorrectionConfig class — Configuration for one correction run.
  • CorrectionManifest class — Durable record of one correction run (proto-bundle; chainable, CR-20).
  • CorrectionRelations class — Registry of edge types the correction overlay adds to the spine graph.
  • CorrectionSession class — A resumable, reopen-able correction review over one or more sources.
  • Entity class — A source-spanning identity in the shared entity substrate (DEC 4ec6a49c).
  • SpineSegment class — A committed layer-0 Segment loaded from the graph (read view).
  • WorklistItem class — One spine segment surfaced for review, with its deterministic Tier-1 flags.
  • new_run_id function — Generate a unique, sortable correction run id.

cjm_transcript_correction_core.pipeline

  • collect_capability_info function — Record capability identity + data-DB pointers for the run manifest (provenance).
  • compute_worklist function — Recompute the worklist from layer-0 + signals + review state (only decisions persist).
  • confirm_seam function — HITL approval seam in its cheapest viable form (log + optional CLI prompt).
  • load_decomp_manifest function — Load + lightly validate a decomp-core run manifest (untyped JSON; CR-20 interchange).
  • prune_empty_segments function — First operation: prune empty (silence) segments as one grouping correction (D14).
  • resolve_graph_db_path function — Resolve the graph DB path: explicit override > the decomp manifest's recorded db_path.
  • review_worklist function — Interactive review loop -> text_content corrections (cheapest HITL seam).
  • run_correction function — Correct every source in a decomp run manifest (prune + worklist surfacing).
  • run_review function — Interactive review pass over a decomp manifest's flagged worklist (text corrections).

cjm_transcript_correction_core.signals

  • boundary_punct_caps_flags function — Bidirectional boundary punctuation/capitalization heuristics (in-segment only).
  • cluster_variants function — Cluster word variants by phonetic key + edit distance (fix-one-fix-all).
  • compute_signal_flags function — Combine all deterministic Tier-1 signals into per-segment flags.
  • detect_empty_segments function — Find empty-text segments (silence VAD chunks with no aligned words; decomp D14).
  • fa_coverage_flags function — Flag segments whose forced-alignment coverage looks suspect (Tier-1).
  • levenshtein function — Levenshtein edit distance (pure, in-core; variant-clustering primitive).
  • phonetic_key function — Compute a coarse phonetic key for a word (groups like-sounding variants).
  • speaker_turn_proposals function — Dominant diarization cluster per segment — the assign lane's proposal paint.
  • variant_divergence function — Within-segment cross-transcriber divergence (stage 5: intra-graph).

Dependencies

Depends on: cjm-context-graph-layer, cjm-context-graph-primitives, cjm-substrate, cjm-transcript-graph-schema Used by: cjm-transcript-correction-tui, cjm-workflow-hub-tui

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cjm_transcript_correction_core-0.0.5.tar.gz (74.4 kB view details)

Uploaded Source

Built Distribution

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

cjm_transcript_correction_core-0.0.5-py3-none-any.whl (61.6 kB view details)

Uploaded Python 3

File details

Details for the file cjm_transcript_correction_core-0.0.5.tar.gz.

File metadata

File hashes

Hashes for cjm_transcript_correction_core-0.0.5.tar.gz
Algorithm Hash digest
SHA256 fce84aba3c7311652b031cc37a569e899e9ebeec917c4e0b283a53f6e73516ba
MD5 61be6efcacb6bbdae6f849e597215225
BLAKE2b-256 5e3a0979994fcec57f001b91a8c3c4edae060a173236c9c3b34de8906cede834

See more details on using hashes here.

File details

Details for the file cjm_transcript_correction_core-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for cjm_transcript_correction_core-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4d3bb6529ca08f15aaa2cbbbad637633aa3bc724481a36e71fa0902b80168156
MD5 ad56515e5c9f50574c15577e2fb06467
BLAKE2b-256 6ed58cc8671535da957498ec52d9d3ae63e3d3adffddaf4df485276c023a6d79

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.10

2 files

0.0.6

2 files

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page