langchain_community.document_loaders.unstructured.UnstructuredBaseLoader¶
- class langchain_community.document_loaders.unstructured.UnstructuredBaseLoader(mode: str = 'single', post_processors: Optional[List[Callable]] = None, **unstructured_kwargs: Any)[source]¶
基础加载器,使用`Unstructured`。
使用文件路径进行初始化。
Methods
__init__([mode, post_processors])使用文件路径进行初始化。
一个用于文档的惰性加载器。
aload()将数据加载到文档对象中。
加载文件。
load()将数据加载到文档对象中。
load_and_split([text_splitter])加载文档并分割成块。块作为文档返回。
- Parameters
mode (str) –
post_processors (Optional[List[Callable]]) –
unstructured_kwargs (Any) –
- __init__(mode: str = 'single', post_processors: Optional[List[Callable]] = None, **unstructured_kwargs: Any)[source]¶
使用文件路径进行初始化。
- Parameters
mode (str) –
post_processors (Optional[List[Callable]]) –
unstructured_kwargs (Any) –
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]¶
加载文档并分割成块。块作为文档返回。
不要覆盖此方法。应该被视为已弃用!
- 参数:
- text_splitter: 用于分割文档的TextSplitter实例。
默认为RecursiveCharacterTextSplitter。
- 返回:
文档列表。
- Parameters
text_splitter (Optional[TextSplitter]) –
- Return type
List[Document]