langchain_community.document_loaders.evernote.EverNoteLoader

class langchain_community.document_loaders.evernote.EverNoteLoader(file_path: Union[str, Path], load_single_document: bool = True)[source]

从`EverNote`加载。

加载一个EverNote笔记本导出文件,例如my_notebook.enex到Documents。 可以在以下网址找到有关生成此文件的说明: https://help.evernote.com/hc/en-us/articles/209005557-Export-notes-and-notebooks-as-ENEX-or-HTML

目前只提取笔记中的纯文本,并将其存储为Document的内容,笔记上的任何非内容元数据(例如’author’、’created’、’updated’等,但不包括’content-raw’或’resource’)标签将被提取并存储为Document的元数据。

参数:

file_path (str): 笔记本导出文件的路径,带有.enex扩展名 load_single_document (bool): 是否将所有笔记的内容连接成一个长的Document。 如果设置为True(默认值),则文档上的唯一元数据将是包含导出文件名的’source’。

使用文件路径进行初始化。

Methods

__init__(file_path[, load_single_document])

使用文件路径进行初始化。

alazy_load()

一个用于文档的惰性加载器。

aload()

将数据加载到文档对象中。

lazy_load()

从EverNote导出文件中加载文档。

load()

将数据加载到文档对象中。

load_and_split([text_splitter])

加载文档并分割成块。块作为文档返回。

Parameters
  • file_path (Union[str, Path]) –

  • load_single_document (bool) –

__init__(file_path: Union[str, Path], load_single_document: bool = True)[source]

使用文件路径进行初始化。

Parameters
  • file_path (Union[str, Path]) –

  • load_single_document (bool) –

async alazy_load() AsyncIterator[Document]

一个用于文档的惰性加载器。

Return type

AsyncIterator[Document]

async aload() List[Document]

将数据加载到文档对象中。

Return type

List[Document]

lazy_load() Iterator[Document][source]

从EverNote导出文件中加载文档。

Return type

Iterator[Document]

load() List[Document]

将数据加载到文档对象中。

Return type

List[Document]

load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]

加载文档并分割成块。块作为文档返回。

不要覆盖此方法。应该被视为已弃用!

参数:
text_splitter: 用于分割文档的TextSplitter实例。

默认为RecursiveCharacterTextSplitter。

返回:

文档列表。

Parameters

text_splitter (Optional[TextSplitter]) –

Return type

List[Document]

Examples using EverNoteLoader