Spaces:
Sleeping
Sleeping
File size: 377 Bytes
1c223a0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from __future__ import annotations
from dataclasses import asdict, dataclass
@dataclass(frozen=True, slots=True)
class ChunkRecord:
chunk_id: str
doc_id: str
filename: str
chunk_index: int
char_start: int
char_end: int
char_count: int
word_count: int
preview: str
text: str
def to_dict(self) -> dict:
return asdict(self)
|