Text Stream Adapter
A streaming interface for converting continuous text into GSM substrate signals
The text‑stream adapter processes continuous or multi‑segment text and converts it into structural vectors, drift deltas, invariant signals, and event objects. It enables real‑time analysis of transcripts, policy drafts, debates, governance documents, or any evolving text source.
Purpose of the text‑stream adapter#
The adapter enables:
- incremental mapping of text into structural vectors
- detection of structural shifts across a text stream
- real‑time drift and tension monitoring
- generation of structural events (alignment, tension, drift, transition)
- feeding the Observer’s history/now/future lenses
- supporting dashboards and live analysis tools
It acts as the bridge between raw text and the GSM substrate.
Input model#
The adapter accepts:
- continuous text streams
- multi‑sentence paragraphs
- transcripts
- policy drafts
- chat logs
- DSL‑embedded text
Each segment is processed independently and cumulatively.
Processing pipeline#
-
Segment parsing
- split text into structural claims
- identify statement types
- detect modifiers and intensifiers
-
Mapping to axes
- apply statement_mapping_rules
- compute raw axis contributions
- apply coupling rules
-
Normalization
- clamp to [0, 1]
- apply coupling adjustments
- compute confidence
-
Drift computation
- compare with previous vector
- compute delta and magnitude
- classify drift category
-
Invariant evaluation
- aligned, tension, violated
- compute tension score
-
Physics evaluation
- detect cross‑axis forces
- compute compensatory or destabilizing movement
-
Basin classification
- nearest basin
- basin distance
- boundary proximity
-
Regime mode and phase state
- classify operational mode
- update phase discipline
-
Event generation
- alignment, tension, drift, transition, regime‑shift
-
Observer integration
- update history, now, and future lenses
Output model#
Each processed segment produces:
segment_output:
segment_id: "<unique_id>"
text: "<raw_text>"
vector:
C: <number>
M: <number>
O: <number>
A: <number>
T: <number>
drift:
vector: [<dC>, <dM>, <dO>, <dA>, <dT>]
magnitude: <number>
category: "<micro|meso|macro|regime_shift>"
invariants:
aligned: [...]
tension: [...]
violated: [...]
tension_score: <number>
physics_forces:
- axis_pair: "<C↔O | M↔A | O↔T>"
magnitude: <number>
direction: "<positive|negative>"
basin:
nearest_basin: "<CPL|CPF|CTR|PCL|HCL>"
basin_distance: <number>
boundary_proximity: <number>
stability_score: <number>
regime_mode: "<mode>"
phase_state: "<phase>"
events: [...]
metadata:
timestamp: "<YYYY-MM-DD>"
confidence: <0–1>Streaming behavior#
The adapter maintains:
- previous_vector — for drift computation
- cumulative_drift — for long‑form analysis
- segment_history — for observer integration
- structural_debt — for phase discipline
- event_log — for dashboards and replay
This enables real‑time structural interpretation.
Integration with the Analyzer#
The text‑stream adapter connects to:
- statement_mapping_rules — for axis contributions
- substrate_adapters — for normalization and metadata
- substrate_validation_rules — for structural integrity
- invariant_checker — for tension and violations
- physics_engine — for cross‑axis forces
- drift_detector — for movement classification
- basin_classifier — for topology interpretation
- regime_modes — for operational behavior
- phase_discipline — for phase transitions
- observer_history/now/future — for structural timelines
- simulation_engine — for scenario alignment
Example use cases#
- analyzing a political speech
- processing a governance charter
- monitoring a debate or negotiation
- interpreting a policy draft as it evolves
- converting chat logs into structural signals
- teaching students how structure emerges from text