Spaces:
Running
Running
File size: 347 Bytes
5301c48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from abc import ABC, abstractmethod
class TextSplitter(ABC):
"""Abstract base class for text splitters."""
@abstractmethod
def split_text(self, text: str) -> list[str]:
"""Split text into chunks.
Args:
text: The text to split.
Returns:
List of text chunks.
"""
pass
|