
    j
                     |   d dl mZmZmZmZ d dlmZ d dlmZm	Z	 d dl
mZmZ d dlmZmZ d dlmZ  e	             eej                   e            dddddddd	gd
f	dee         dee         dededee         dee         dee         deee                  dededee         fd                                    ZdS )    )AnyBinaryIOListOptional)add_chunking_strategy)Elementprocess_metadata)FileTypeadd_metadata_with_filetype)get_last_modified_date get_last_modified_date_from_file)convert_and_partition_docxNTautoFfilenamefileinclude_metadatainfer_table_structuremetadata_filenamemetadata_last_modifiedchunking_strategy	languagesdetect_language_per_elementkwargsreturnc	           
      ~    d}
| rt          |           }
n|rt          |          }
t          d| ||||p|
||          S )aX  Partitions Open Office Documents in .odt format into its document elements.

    Parameters
    ----------
    filename
        A string defining the target filename path.
    file
        A file-like object using "rb" mode --> open(filename, "rb").
    infer_table_structure
        If True, any Table elements that are extracted will also have a metadata field
        named "text_as_html" where the table's text content is rendered into an html string.
        I.e., rows and cells are preserved.
        Whether True or False, the "text" field is always present in any Table element
        and is the text content of the table (no structure).
    metadata_last_modified
        The last modified date for the document.
    languages
        User defined value for `metadata.languages` if provided. Otherwise language is detected
        using naive Bayesian filter via `langdetect`. Multiple languages indicates text could be
        in either language.
        Additional Parameters:
            detect_language_per_element
                Detect language per element instead of at the document level.
    Nodt)source_formatr   r   r   r   r   r   r   )r   r   r   )r   r   r   r   r   r   r   r   r   r   last_modification_dates              d/lsinfo/ai/hellotax_ai/base_platform/venv/lib/python3.11/site-packages/unstructured/partition/odt.pypartition_odtr       sq    P " H!7!A!A	 H!A$!G!G%3+5O9O$?	 	 	 	    )typingr   r   r   r   unstructured.chunkingr   unstructured.documents.elementsr   r	    unstructured.file_utils.filetyper
   r   unstructured.partition.commonr   r   unstructured.partition.docxr   ODTstrboolr     r!   r   <module>r,      s   0 0 0 0 0 0 0 0 0 0 0 0 7 7 7 7 7 7 E E E E E E E E Q Q Q Q Q Q Q Q        C B B B B B HL))"#!"&'+,0'+&,X(-4 4sm4
8
4 4  	4
  }4 %SM4  }4 S	"4 "&4 4 
']4 4 4  *) 4 4 4r!   