To avoid broken sentences when using the unstructured.partition_pdf function, ensure you set the strategy="hi_res" parameter, which uses a more advanced parsing method to maintain sentence integrity.
Here is the code snippet you can refer to:

In the above code we are using the following key points:
- partition_pdf function: Extracts structured content from the PDF file.
- strategy="hi_res": Uses a high-resolution method to avoid sentence splitting and improve text parsing quality.
- Combining text elements: Ensures all extracted text elements are joined into a single coherent output.
Hence, by using the hi_res strategy, the unstructured.partition_pdf function preserves sentence structure and improves text extraction quality from PDFs.