Files
UmbraTrans/umbratrans_web/translation/segment.py
umbra audio dda079f605 commit audio ingest: apply 0008+0009 migrations, wire Postgres adapter to commit path
- Apply migration 0008_audio_source_import (additive schema for source import)
- Apply migration 0009_translation_import_runs (ledger table for import runs)
- Wire PostgresAudioImportStore into HTTP commit path with org from node credential
- Commit path uses PG store with org from node, no payload org
- Bundle hash 21ce5687… remains frozen until v2; no authority transferred
2026-10-19 04:35:07 -07:00

15 lines
489 B
Python

"""Dialogue-aware sentence segmentation."""
import re
class Segmenter:
def __init__(self):
pass
def segment(self, text: str) -> list:
# Simple implementation - would use spaCy in production
# For now, basic sentence splitting with dialogue awareness
# This is a placeholder; production needs proper dialogue-aware splitting
sentences = re.split(r'(?<=[.!?])\s+(?=[A-Z"])', text)
return [s.strip() for s in sentences if s.strip()]