[docs]classUnstructuredCHMLoader(UnstructuredFileLoader):"""Load `CHM` files using `Unstructured`. CHM means Microsoft Compiled HTML Help. Examples -------- from langchain_community.document_loaders import UnstructuredCHMLoader loader = UnstructuredCHMLoader("example.chm") docs = loader.load() References ---------- https://github.com/dottedmag/pychm http://www.jedrea.com/chmlib/ """
[docs]def__init__(self,file_path:Union[str,Path],mode:str="single",**unstructured_kwargs:Any,):""" Args: file_path: The path to the CHM file to load. mode: The mode to use when loading the file. Can be one of "single", "multi", or "all". Default is "single". **unstructured_kwargs: Any kwargs to pass to the unstructured. """file_path=str(file_path)super().__init__(file_path=file_path,mode=mode,**unstructured_kwargs)