- 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
15 lines
489 B
Python
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()]
|