addyo07's picture
Tier-2 parking snapshot 2026-10-04
46e27b5 verified
Raw History Blame Contribute Delete
2.16 kB
"""
Canonical data models for Vox Dictation Refinement dataset.
Governed by GOAL.md and AGENTS.md.
Single-model non-autoregressive span extraction with single label: "speech disfluency".
"""
from typing import List, Literal, Optional, Tuple
from pydantic import BaseModel, Field
class RawCandidate(BaseModel):
"""Raw output from Generator LLM: only the corrupted sentence and added disfluent spans."""
raw_text: str = Field(description="The full corrupted spoken utterance")
clean_text: str = Field(description="The original clean sentence")
disfluent_spans: List[str] = Field(
default_factory=list,
description="Exact substrings added into raw_text (fillers, false starts, retractions) to excise"
)
class Span(BaseModel):
"""Character-level span representation with verified offsets."""
label: Literal["speech disfluency"] = "speech disfluency"
span: Tuple[int, int] = Field(description="Exact [start, end] character offsets in raw_text")
text: str = Field(description="Exact substring in raw_text slice")
confidence: float = Field(default=1.0, ge=0.0, le=1.0)
origin: Optional[str] = Field(
default=None,
description=(
"PROVENANCE ONLY, never a training signal. Which gold annotation produced "
"this span: 'region:D' (disfluency), 'region:E' (edit/self-repair), "
"'region:F' (Tier-1 filled pause), 'correction' (the '[A, +B]' spurious->"
"repair group), 'synthetic:<archetype>' (LLM corruption), or None for "
"hand-written data. Used to stratify and audit the dataset mixture."
),
)
class DatasetExample(BaseModel):
"""Canonical Unified JSONL Example for Training and Evaluation."""
id: str
category: Literal["CLEAN", "DISFLUENCY"]
raw_text: str
clean_text: str
spans: List[Span] = Field(default_factory=list)
class AuditVerdict(BaseModel):
"""Zero-temperature Judge audit result for an individual candidate."""
id: str
verdict: Literal["PASS", "FAIL"]
category_accurate: bool
no_false_deletions: bool
number_entity_preserved: bool
reason: str