cjm-transcript-graph-schema 0.0.11__tar.gz → 0.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cjm_transcript_graph_schema-0.0.11/cjm_transcript_graph_schema.egg-info → cjm_transcript_graph_schema-0.0.12}/PKG-INFO +6 -3
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/README.md +5 -2
- cjm_transcript_graph_schema-0.0.12/cjm_transcript_graph_schema/__init__.py +1 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/cjm_transcript_graph_schema/schema.py +9 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12/cjm_transcript_graph_schema.egg-info}/PKG-INFO +6 -3
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/tests/test_schema.py +7 -8
- cjm_transcript_graph_schema-0.0.11/cjm_transcript_graph_schema/__init__.py +0 -1
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/LICENSE +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/MANIFEST.in +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/cjm_transcript_graph_schema.egg-info/SOURCES.txt +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/cjm_transcript_graph_schema.egg-info/dependency_links.txt +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/cjm_transcript_graph_schema.egg-info/requires.txt +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/cjm_transcript_graph_schema.egg-info/top_level.txt +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/pyproject.toml +0 -0
- {cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cjm-transcript-graph-schema
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcript, and Segment nodes with deterministic identity tuples and graph-node mapping, shared by the transcription, decomposition, and correction workflow cores.
|
|
5
5
|
Author-email: "Christian J. Mills" <9126128+cj-mills@users.noreply.github.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -23,7 +23,8 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
23
23
|
|
|
24
24
|
## Modules
|
|
25
25
|
|
|
26
|
-
- **`cjm_transcript_graph_schema.
|
|
26
|
+
- **`cjm_transcript_graph_schema.__init__`**
|
|
27
|
+
- **`cjm_transcript_graph_schema.schema`** — The audio-transcript layer schema (where-graph-begins locked layer schema): Source -> AudioSegment(coarse boundary) -> AudioRendition(model-input: raw | vocals | ...) -> Transcript(per-transcriber variants) emitted by transcription, extended with the fine Segment spine (per-rendition) by decomposition, and with the intrinsic Collection layer ABOVE Source (book/series/course; proposed-by-tool / confirmed-by-actor, order optional) captured at transcription hand-off. Deterministic identity tuples per the stage-5 ratified rule; the AudioRendition node lets raw + preprocessed model-inputs of one boundary coexist in one graph. Document from the pre-CR-18 era dissolves into Source.
|
|
27
28
|
|
|
28
29
|
## API
|
|
29
30
|
|
|
@@ -42,6 +43,8 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
42
43
|
- `audio_segment_node_id` _function_ — AudioSegment identity = (source, boundary range).
|
|
43
44
|
- `collection_edges` _function_ — Membership edges for a collection (ae3464fc: ORDER IS OPTIONAL).
|
|
44
45
|
- `collection_node_id` _function_ — Collection identity = the NORMALIZED TITLE (ratified fork, hub-session
|
|
46
|
+
- `external_config_hash` _function_ — The config hash an external landing carries where a capability's effective
|
|
47
|
+
- `external_transcriber_name` _function_ — Transcriber name for an EXTERNAL landing (ruling 9ffce5f7 (1)): the model id
|
|
45
48
|
- `normalize_collection_title` _function_ — Normalize a collection title for identity derivation.
|
|
46
49
|
- `segment_node_id` _function_ — Fine Segment identity = audio-side only (audio rendition, VAD config, chunk
|
|
47
50
|
- `source_node_id` _function_ — Source identity = the ingested file's content hash (Thread-1 ingested-root identity).
|
|
@@ -50,4 +53,4 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
50
53
|
## Dependencies
|
|
51
54
|
|
|
52
55
|
**Depends on:** `cjm-context-graph-layer`, `cjm-context-graph-primitives`
|
|
53
|
-
**Used by:** `cjm-context-graph-layer`, `cjm-transcript-correction-core`, `cjm-transcript-
|
|
56
|
+
**Used by:** `cjm-context-graph-layer`, `cjm-transcript-correction-core`, `cjm-transcript-decomp-core`, `cjm-transcription-core`, `cjm-transcription-qt`, `cjm-workflow-hub-qt`
|
|
@@ -6,7 +6,8 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
6
6
|
|
|
7
7
|
## Modules
|
|
8
8
|
|
|
9
|
-
- **`cjm_transcript_graph_schema.
|
|
9
|
+
- **`cjm_transcript_graph_schema.__init__`**
|
|
10
|
+
- **`cjm_transcript_graph_schema.schema`** — The audio-transcript layer schema (where-graph-begins locked layer schema): Source -> AudioSegment(coarse boundary) -> AudioRendition(model-input: raw | vocals | ...) -> Transcript(per-transcriber variants) emitted by transcription, extended with the fine Segment spine (per-rendition) by decomposition, and with the intrinsic Collection layer ABOVE Source (book/series/course; proposed-by-tool / confirmed-by-actor, order optional) captured at transcription hand-off. Deterministic identity tuples per the stage-5 ratified rule; the AudioRendition node lets raw + preprocessed model-inputs of one boundary coexist in one graph. Document from the pre-CR-18 era dissolves into Source.
|
|
10
11
|
|
|
11
12
|
## API
|
|
12
13
|
|
|
@@ -25,6 +26,8 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
25
26
|
- `audio_segment_node_id` _function_ — AudioSegment identity = (source, boundary range).
|
|
26
27
|
- `collection_edges` _function_ — Membership edges for a collection (ae3464fc: ORDER IS OPTIONAL).
|
|
27
28
|
- `collection_node_id` _function_ — Collection identity = the NORMALIZED TITLE (ratified fork, hub-session
|
|
29
|
+
- `external_config_hash` _function_ — The config hash an external landing carries where a capability's effective
|
|
30
|
+
- `external_transcriber_name` _function_ — Transcriber name for an EXTERNAL landing (ruling 9ffce5f7 (1)): the model id
|
|
28
31
|
- `normalize_collection_title` _function_ — Normalize a collection title for identity derivation.
|
|
29
32
|
- `segment_node_id` _function_ — Fine Segment identity = audio-side only (audio rendition, VAD config, chunk
|
|
30
33
|
- `source_node_id` _function_ — Source identity = the ingested file's content hash (Thread-1 ingested-root identity).
|
|
@@ -33,4 +36,4 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
33
36
|
## Dependencies
|
|
34
37
|
|
|
35
38
|
**Depends on:** `cjm-context-graph-layer`, `cjm-context-graph-primitives`
|
|
36
|
-
**Used by:** `cjm-context-graph-layer`, `cjm-transcript-correction-core`, `cjm-transcript-
|
|
39
|
+
**Used by:** `cjm-context-graph-layer`, `cjm-transcript-correction-core`, `cjm-transcript-decomp-core`, `cjm-transcription-core`, `cjm-transcription-qt`, `cjm-workflow-hub-qt`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.12"
|
|
@@ -14,6 +14,7 @@ from cjm_context_graph_primitives.slices import CharSlice, FullContent, TimeSlic
|
|
|
14
14
|
|
|
15
15
|
class TranscriptGraphLabels:
|
|
16
16
|
"""Node labels of the audio-transcript layer schema."""
|
|
17
|
+
|
|
17
18
|
SOURCE = "Source" # Provenance root: one ingested media file
|
|
18
19
|
AUDIO_SEGMENT = "AudioSegment" # Coarse ~5-min spine member: a boundary range of the Source (an audio FACT; rendition-independent)
|
|
19
20
|
AUDIO_RENDITION = "AudioRendition" # A model-input rendition OF an AudioSegment (raw convert | vocals | future enhancement); OWNS the model-input WAV
|
|
@@ -141,6 +142,7 @@ def segment_node_id(
|
|
|
141
142
|
@dataclass
|
|
142
143
|
class SourceNode:
|
|
143
144
|
"""The provenance root: one ingested media file."""
|
|
145
|
+
|
|
144
146
|
content_hash: str # Content hash over the file ("algo:hexdigest"; the identity input)
|
|
145
147
|
path: str # Original media path (location, may dangle; identity is the hash)
|
|
146
148
|
title: Optional[str] = None # Display title; None = path stem
|
|
@@ -179,6 +181,7 @@ class AudioSegmentNode:
|
|
|
179
181
|
content hash); the structural chain to the Source rides the PART_OF edge +
|
|
180
182
|
the start/end properties. `segment_path` (the source-codec cut) stays here as
|
|
181
183
|
a rendition-independent archival pointer."""
|
|
184
|
+
|
|
182
185
|
source: str # Owning Source node id
|
|
183
186
|
index: int # Position in the coarse spine (0-based)
|
|
184
187
|
start: float # Boundary start (source-coordinate seconds)
|
|
@@ -222,6 +225,7 @@ class AudioRenditionNode:
|
|
|
222
225
|
nodes. Connects UP to its AudioSegment by DERIVED_FROM (it is derived from the
|
|
223
226
|
segment's audio); the production act is recorded separately by a CR-18
|
|
224
227
|
`Derivation` event."""
|
|
228
|
+
|
|
225
229
|
audio_segment: str # Owning AudioSegment node id
|
|
226
230
|
model_input_path: str # The 16kHz mono WAV consumed by transcription/VAD/FA
|
|
227
231
|
model_input_hash: str # Content hash over that WAV (the rendition's identity-of-record artifact)
|
|
@@ -259,6 +263,7 @@ class AudioRenditionNode:
|
|
|
259
263
|
class TranscriptNode:
|
|
260
264
|
"""One transcriber's text for one AudioRendition (per-transcriber variants at
|
|
261
265
|
the coarse layer — cross-transcriber divergence lives here, C4/C14)."""
|
|
266
|
+
|
|
262
267
|
rendition: str # Owning AudioRendition node id
|
|
263
268
|
transcriber: str # Transcriber capability name
|
|
264
269
|
config_hash: str # Transcriber config hash
|
|
@@ -317,6 +322,7 @@ class TranscriptSliceRef:
|
|
|
317
322
|
"""One per-transcriber char-range reference for a fine Segment: where this
|
|
318
323
|
segment's text lives inside a Transcript node's text (Thread-1
|
|
319
324
|
slices-until-promoted — variants are slices, never duplicated fine text)."""
|
|
325
|
+
|
|
320
326
|
transcript: str # Transcript node id
|
|
321
327
|
start_char: int # Slice start into the Transcript's text
|
|
322
328
|
end_char: int # Slice end
|
|
@@ -348,6 +354,7 @@ class SegmentNode:
|
|
|
348
354
|
`skeleton_hash` stays the live spine's, so no reader splits the spine),
|
|
349
355
|
the old ones are stamped `superseded_by` (the respine op id) and leave the
|
|
350
356
|
live view — readers filter `superseded_by is null`; nothing is deleted."""
|
|
357
|
+
|
|
351
358
|
rendition: str # Owning AudioRendition node id
|
|
352
359
|
vad_config_hash: str # Skeleton config hash (identity input: VAD config, + split policy when a split stage ran)
|
|
353
360
|
chunk_start: float # VAD chunk start (chunk-local seconds within the rendition WAV)
|
|
@@ -420,6 +427,7 @@ class RespinedChunkEntry:
|
|
|
420
427
|
dependents (stranded ids on explicit say-so; carried = the corrections the
|
|
421
428
|
chunk-scoped transfer re-homed by time: accepted event inserts, speaker
|
|
422
429
|
assignments). The op id is what `superseded_by` on the old segments names."""
|
|
430
|
+
|
|
423
431
|
audio_segment: str # AudioSegment node id (the coarse chunk)
|
|
424
432
|
transcript: str # The landed Transcript node id (= identity_salt of the new segments)
|
|
425
433
|
run: str # The decomp run id the re-derivation ran under
|
|
@@ -492,6 +500,7 @@ class CollectionNode:
|
|
|
492
500
|
rename, refile out of, or dissolve. root_kind=asserted — a collection is
|
|
493
501
|
a grouping ASSERTION about ingested content, not ingested content itself.
|
|
494
502
|
Collection PART_OF Collection nesting is grammar-free (no v0 tooling)."""
|
|
503
|
+
|
|
495
504
|
title: str # Display title (identity input via normalize_collection_title)
|
|
496
505
|
status: str = "proposed" # "proposed" (tool inference) | "confirmed" (human act)
|
|
497
506
|
actor: str = "human" # Who declared it (attribution; e.g. "human", "tui:transcription", "cli:transcribe")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cjm-transcript-graph-schema
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcript, and Segment nodes with deterministic identity tuples and graph-node mapping, shared by the transcription, decomposition, and correction workflow cores.
|
|
5
5
|
Author-email: "Christian J. Mills" <9126128+cj-mills@users.noreply.github.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -23,7 +23,8 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
23
23
|
|
|
24
24
|
## Modules
|
|
25
25
|
|
|
26
|
-
- **`cjm_transcript_graph_schema.
|
|
26
|
+
- **`cjm_transcript_graph_schema.__init__`**
|
|
27
|
+
- **`cjm_transcript_graph_schema.schema`** — The audio-transcript layer schema (where-graph-begins locked layer schema): Source -> AudioSegment(coarse boundary) -> AudioRendition(model-input: raw | vocals | ...) -> Transcript(per-transcriber variants) emitted by transcription, extended with the fine Segment spine (per-rendition) by decomposition, and with the intrinsic Collection layer ABOVE Source (book/series/course; proposed-by-tool / confirmed-by-actor, order optional) captured at transcription hand-off. Deterministic identity tuples per the stage-5 ratified rule; the AudioRendition node lets raw + preprocessed model-inputs of one boundary coexist in one graph. Document from the pre-CR-18 era dissolves into Source.
|
|
27
28
|
|
|
28
29
|
## API
|
|
29
30
|
|
|
@@ -42,6 +43,8 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
42
43
|
- `audio_segment_node_id` _function_ — AudioSegment identity = (source, boundary range).
|
|
43
44
|
- `collection_edges` _function_ — Membership edges for a collection (ae3464fc: ORDER IS OPTIONAL).
|
|
44
45
|
- `collection_node_id` _function_ — Collection identity = the NORMALIZED TITLE (ratified fork, hub-session
|
|
46
|
+
- `external_config_hash` _function_ — The config hash an external landing carries where a capability's effective
|
|
47
|
+
- `external_transcriber_name` _function_ — Transcriber name for an EXTERNAL landing (ruling 9ffce5f7 (1)): the model id
|
|
45
48
|
- `normalize_collection_title` _function_ — Normalize a collection title for identity derivation.
|
|
46
49
|
- `segment_node_id` _function_ — Fine Segment identity = audio-side only (audio rendition, VAD config, chunk
|
|
47
50
|
- `source_node_id` _function_ — Source identity = the ingested file's content hash (Thread-1 ingested-root identity).
|
|
@@ -50,4 +53,4 @@ Audio-transcript layer schema for context graphs: Source, AudioSegment, Transcri
|
|
|
50
53
|
## Dependencies
|
|
51
54
|
|
|
52
55
|
**Depends on:** `cjm-context-graph-layer`, `cjm-context-graph-primitives`
|
|
53
|
-
**Used by:** `cjm-context-graph-layer`, `cjm-transcript-correction-core`, `cjm-transcript-
|
|
56
|
+
**Used by:** `cjm-context-graph-layer`, `cjm-transcript-correction-core`, `cjm-transcript-decomp-core`, `cjm-transcription-core`, `cjm-transcription-qt`, `cjm-workflow-hub-qt`
|
{cjm_transcript_graph_schema-0.0.11 → cjm_transcript_graph_schema-0.0.12}/tests/test_schema.py
RENAMED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"""Tests for cjm_transcript_graph_schema.schema — identity tuples + wire shapes.
|
|
2
2
|
|
|
3
3
|
Projected from the schema notebook's four test cells at the c25780e8 flip."""
|
|
4
|
+
|
|
4
5
|
from cjm_context_graph_primitives.provenance import SourceRef
|
|
5
|
-
from cjm_transcript_graph_schema.schema import (
|
|
6
|
-
|
|
7
|
-
TranscriptNode, TranscriptSliceRef,
|
|
8
|
-
audio_rendition_node_id,
|
|
9
|
-
audio_segment_node_id,
|
|
6
|
+
from cjm_transcript_graph_schema.schema import (audio_rendition_node_id, audio_segment_node_id,
|
|
7
|
+
AudioRenditionNode, AudioSegmentNode,
|
|
10
8
|
collection_edges, collection_node_id,
|
|
11
|
-
normalize_collection_title,
|
|
12
|
-
segment_node_id, source_node_id,
|
|
13
|
-
transcript_node_id
|
|
9
|
+
CollectionNode, normalize_collection_title,
|
|
10
|
+
segment_node_id, SegmentNode, source_node_id,
|
|
11
|
+
SourceNode, transcript_node_id, TranscriptNode,
|
|
12
|
+
TranscriptSliceRef)
|
|
14
13
|
|
|
15
14
|
SID = source_node_id("sha256:abc")
|
|
16
15
|
A1 = audio_segment_node_id(SID, 0.0, 300.2)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|