Skip to content

Commit cfcaea8

Browse files
authored
Partitioning overview: image and table treatments in PDF files (#653)
1 parent 4ff2439 commit cfcaea8

9 files changed

+38
-0
lines changed
791 KB
Loading
689 KB
Loading
634 KB
Loading
526 KB
Loading
645 KB
Loading
517 KB
Loading
591 KB
Loading
573 KB
Loading

ui/partitioning.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,44 @@ import PlatformPartitioningStrategies from '/snippets/general-shared-text/platfo
2323

2424
<PlatformPartitioningStrategies />
2525

26+
## Images and tables in PDF files
27+
28+
The differences between the various partitioning strategies can be more clearly demonstrated by the ways each of these strategies handle images and tables within PDF files.
29+
30+
For example, the **Fast** partitioning strategy skips processing images altogether in PDF files:
31+
32+
![The Fast strategy skips processing images in PDF files](/img/partitioning/Fast-Image-Example.png)
33+
34+
For tables, the **Fast** strategy interprets table cells in PDF files as a mixture of title, list, and uncategorized text elements:
35+
36+
![The Fast strategy interprets table cells in PDF files as text](/img/partitioning/Fast-Table-Example.png)
37+
38+
The **High Res** strategy, by itself, processes images in PDF files sometimes with limited output:
39+
40+
![The High Res strategy processes images in PDF files with limited results](/img/partitioning/Hi-Res-Image-Example.png)
41+
42+
However, when combined with the [image description](/ui/enriching/image-descriptions) enrichment, the **High Res** strategy can process images in PDF files with better result output:
43+
44+
![The High Res strategy with image description produces better results](/img/partitioning/Hi-Res-Image-Enriched-Example.png)
45+
46+
For tables, the **High Res** strategy processes tables in PDF files with the table's text and an HTML representation of the table as output:
47+
48+
![The High Res strategy processes tables in PDF files with the table's text and HTML as output](/img/partitioning/Hi-Res-Table-Example.png)
49+
50+
When combined with the [table description](/ui/enriching/table-descriptions) and [tables to HTML](/ui/enriching/table-to-html) enrichments, the **High Res** strategy can process tables in PDF files with even richer result output:
51+
52+
![The High Res strategy with table summarization and table-to-HTML enrichments produces better results](/img/partitioning/Hi-Res-Table-Enriched-Example.png)
53+
54+
The **VLM** strategy processes images in PDF files with image summaries and text as HTML elements as output. The following example shows GPT-4o by OpenAI being used. If
55+
the **Auto** strategy is selected in this example, Unstructured will route to the **VLM** strategy for processing:
56+
57+
![The VLM strategy processes images in PDF files with image summaries and text as HTML](/img/partitioning/VLM-Auto-Image-GPT-4o-Example.png)
58+
59+
For tables, the **VLM** strategy processes tables in PDF files with the table's text and an HTML representation of the table as output, similar to the **High Res** strategy.
60+
The following example shows GPT-4o by OpenAI being used. If the **Auto** strategy is selected in this example, Unstructured will route to the **VLM** strategy for processing:
61+
62+
![The VLM strategy processes tables in PDF files with table summaries and text as HTML](/img/partitioning/VLM-Auto-Table-GPT-4o-Example.png)
63+
2664
## Supported languages
2765

2866
**Fast** partitioning accepts any text inputs, though automatic language detection of those inputs is restricted to [langdetect](https://pypi.org/project/langdetect/).

0 commit comments

Comments
 (0)