mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-06-27 02:30:08 +00:00

* move partition_pdf to partition folder * move partition.py * refactor partioning bricks into partition diretory * import to nlp for backward compatibility * update docs * update version and bump changelog * fix typo in changelog * update readme reference
11 lines
390 B
Python
11 lines
390 B
Python
import unstructured.partition.pdf as pdf
|
|
|
|
|
|
def test_partition_pdf(filename="example-docs/layout-parser-paper-fast.pdf"):
|
|
partition_pdf_response = pdf.partition_pdf(filename)
|
|
assert partition_pdf_response[0]["type"] == "Title"
|
|
assert (
|
|
partition_pdf_response[0]["text"]
|
|
== "LayoutParser : A Unified Toolkit for Deep Learning Based Document Image Analysis"
|
|
)
|