Parameters
Parameter | Type | Default | Description |
---|---|---|---|
config | DOCXLoaderConfig | Required | Configuration object for DOCX loading behavior |
Functions
__init__
Initializes the DOCXLoader with its specific configuration.
Parameters:
config
(DOCXLoaderConfig): Configuration object for DOCX loading behavior
get_supported_extensions
Gets the list of supported file extensions.
Returns:
List[str]
: List of supported file extensions (.docx
)
_format_table
Formats a table object into a string based on the config.
Parameters:
table
(DocxTable): Table object to format
str
: Formatted table string
_load_single_file
Helper method to load a single .docx file into one or zero Documents.
Parameters:
file_path
(Path): Path to the DOCX file
List[Document]
: List of documents loaded from the file
load
Loads documents from the given .docx source(s) synchronously.
Parameters:
source
(Union[str, Path, List[Union[str, Path]]]): DOCX source(s) to load from
List[Document]
: List of loaded documents
aload
Loads documents from the given .docx source(s) asynchronously.
Parameters:
source
(Union[str, Path, List[Union[str, Path]]]): DOCX source(s) to load from
List[Document]
: List of loaded documents
batch
A synchronous batch load implementation.
Parameters:
sources
(List[Union[str, Path]]): List of DOCX sources to load
List[Document]
: List of loaded documents
abatch
An efficient asynchronous batch load implementation using asyncio.gather.
Parameters:
sources
(List[Union[str, Path]]): List of DOCX sources to load
List[Document]
: List of loaded documents