mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-26 16:55:38 -04:00
14 lines
429 B
Python
14 lines
429 B
Python
"""Loader that loads Microsoft Word files."""
|
|
from typing import List
|
|
|
|
from langchain.document_loaders.unstructured import UnstructuredFileLoader
|
|
|
|
|
|
class UnstructuredDocxLoader(UnstructuredFileLoader):
|
|
"""Loader that uses unstructured to load Microsoft Word files."""
|
|
|
|
def _get_elements(self) -> List:
|
|
from unstructured.partition.docx import partition_docx
|
|
|
|
return partition_docx(filename=self.file_path)
|