UnisKB/apps/common/chunk/__init__.py

19 lines
372 B
Python
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# coding=utf-8
"""
@project: MaxKB
@Author
@file __init__.py
@date2024/7/23 17:03
@desc:
"""
from common.chunk.impl.mark_chunk_handle import MarkChunkHandle
handles = [MarkChunkHandle()]
def text_to_chunk(text: str):
chunk_list = [text]
for handle in handles:
chunk_list = handle.handle(chunk_list)
return chunk_list