langchain.document_loaders.acreom.AcreomLoader¶
- class langchain.document_loaders.acreom.AcreomLoader(path: str, encoding: str = 'UTF-8', collect_metadata: bool = True)[source]¶
Bases:
BaseLoaderLoader that loads acreom vault from a directory.
Methods
__init__(path[, encoding, collect_metadata])A lazy loader for Documents.
load()Load data into Document objects.
load_and_split([text_splitter])Load Documents and split into chunks.
Attributes
Regex to match front matter metadata in markdown files.
Path to the directory containing the markdown files.
Encoding to use when reading the files.
Whether to collect metadata from the front matter.
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]¶
Load Documents and split into chunks. Chunks are returned as Documents.
- Parameters
text_splitter – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns
List of Documents.
- FRONT_MATTER_REGEX = re.compile('^---\\n(.*?)\\n---\\n', re.MULTILINE|re.DOTALL)¶
Regex to match front matter metadata in markdown files.
- collect_metadata¶
Whether to collect metadata from the front matter.
- encoding¶
Encoding to use when reading the files.
- file_path¶
Path to the directory containing the markdown files.