o
    Uag
                     @   s   d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ d dl m	Z	 d d	l m
Z
 d d
lmZ d dlmZ G dd dZdS )    )UnstructuredWordDocumentLoader)UnstructuredCSVLoader)UnstructuredExcelLoader)PyPDFLoader)UnstructuredPowerPointLoader)UnstructuredXMLLoader)
JSONLoader)
TextLoader)UnstructuredMarkdownLoader)UnstructuredTSVLoader)UnstructuredHTMLLoaderc                   @   sl   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS )DocumentLoaderc                 C   s   d S N )selfr   r   f/home/karthikraj/Downloads/corporate allibots 3/corporate_allibot31/allibot3/Loader_functions_utils.py__init__   s   zDocumentLoader.__init__c                 C      t |dd}| }|S )Nelements)mode)r   load)r   Zexcel_file_nameloaderdocsr   r   r   excel_file_loader      z DocumentLoader.excel_file_loaderc                 C      t |}| }|S )z, This loader will support doc and docx files)r   r   )r   Zdocx_doc_file_pathr   r   r   r   r   doc_docx_file_loader   s   z#DocumentLoader.doc_docx_file_loaderc                 C   r   r   )r   r   )r   Zcsv_filepathr   r   r   r   r   csv_file_loader      zDocumentLoader.csv_file_loaderc                 C   r   r   )r   r   )r   Zpdf_filepathr   r   r   r   r   pdf_file_loader$   r   zDocumentLoader.pdf_file_loaderc                 C   r   r   )r   r   )r   Zpptx_filepathr   r   r   r   r   pptx_file_loader)   r   zDocumentLoader.pptx_file_loaderc                 C   r   r   )r   r   )r   Zxml_filepathr   r   r   r   r   xml_file_loader.   r   zDocumentLoader.xml_file_loaderc                 C      t |ddd}| }|S )N.F)	file_pathZ	jq_schematext_content)r   r   )r   Zjson_filepathr   r   r   r   r   json_file_loader3      zDocumentLoader.json_file_loaderc                 C   r   r   )r	   r   )r   Ztext_filepathr   r   r   r   r   text_file_loader8   r   zDocumentLoader.text_file_loaderc                 C   r"   )Nsinglefast)r   strategy)r
   r   )r   Zmd_filepathr   r   r   r   r   markdown_file_loader=   r'   z#DocumentLoader.markdown_file_loaderc                 C   r   Nr   )r$   r   )r   r   )r   Ztsv_filepathr   r   r   r   r   tsv_file_loaderB   r   zDocumentLoader.tsv_file_loaderc                 C   r   r-   )r   r   )r   Zhtml_filepathr   r   r   r   r   html_file_loaderG   r   zDocumentLoader.html_file_loaderN)__name__
__module____qualname__r   r   r   r   r   r    r!   r&   r(   r,   r.   r/   r   r   r   r   r      s    r   N)Z$langchain_community.document_loadersr   r   r   r   r   r   Zlangchain.document_loadersr   r	   r
   Z(langchain_community.document_loaders.tsvr   Z)langchain_community.document_loaders.htmlr   r   r   r   r   r   <module>   s    