PPT parsing
The PPT Parsing operator parses presentation files, extracting text and images to generate Markdown. It automatically converts .ppt files to the .pptx format before parsing. This topic explains how to configure the operator.
Prerequisites
-
To use the workflow feature, you must purchase the unstructured data feature for your instance.
-
You have created the workflow. For more information, see Create a workflow.
Permissions
In a Basic project, project administrators, developers, analysts, and custom project roles with the Dataset - Use permission can use any dataset in the project as an input or output for the operator.
Background
-
The PPT Parsing operator supports the following file formats: .ppt and .pptx.
-
By default, the PPT Parsing operator uses 1 Core and 4 GB of resources.
Procedure
-
In the top navigation bar of the Dataphin homepage, choose R&D > Data Development.
-
In the top navigation bar of the Develop page, select a Project.
-
In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list on the left, click the target workflow to open the canvas. From the Operator Library on the left, drag the PPT Parsing operator to the canvas. In the PPT Parsing pane on the right, configure the following parameters.
Parameter
Description
Step Name
Enter a name for the operator. The name can contain any characters and must not exceed 256 characters.
Input configuration
Dataset
Select the dataset to process. You can select only a mixed dataset. After selecting a dataset, you must also select a Version. By default, the first version of the dataset in ascending order is selected.
When the operator is a downstream node, the selected dataset typically matches the output dataset of the upstream operator.
Input Field
The storage path of the presentation file. You must select a source field from the input dataset. You can select only fields for which the Is URL parameter is set to Yes.
Filter Condition (Optional)
Use SQL syntax. You only need to enter the filter condition that follows the
WHEREclause. You can use system global variables, such as${bizdate}.Operator configuration
Model-Assisted Correction
When this option is disabled, only the built-in model is used for layout analysis and table extraction. When enabled, if the built-in model produces poor results (for example, layout misalignment), the system automatically calls a large model to correct the output and improve parsing accuracy.
Image Content Understanding
When this option is enabled, the system calls a large model to analyze the image content, and replaces the images with text descriptions in the output Markdown. You must also provide a prompt of up to 2,000 characters.
If a Slide contains multiple images, they are parsed sequentially based on their order of appearance.
Model
This parameter can be configured only when Model-Assisted Correction or Image Content Understanding is enabled. Both features share the same model. You can select only a model that is Enabled and whose model type in Intelligent Application Management > Model Configuration includes text or vision (images and videos).
Output configuration
Dataset
You can select Source Dataset or Other Datasets. If the source dataset is a table dataset, Other Datasets is selected by default.
When you select other datasets, you also need to specify a mixed dataset and its version as the output dataset. The selection defaults to the first version of this dataset in ascending order. You can also select other versions of the source dataset.
When you select a source dataset, the metadata generated by the operator is written to the metadata table that corresponds to the same version of the source dataset.
File Output Path
Enter a directory name. If the directory does not exist, it is created.
-
The parsed Markdown file is named using the format
${PPT file name + auto-incrementing number starting from 1}.md. -
The system generates a folder to store the parsed images.
Include image links in output markdown
If you select Yes, the operator includes links to the extracted images in the output Markdown. If you select No, these links are removed.
Loading policy
If a primary key exists in the metadata table of the selected output dataset, Update on primary key conflict is selected by default. If no primary key exists, Append data is selected by default.
-
Append data: Appends new data directly to the target table. The system reports an error if a primary key or constraint conflict occurs.
-
Update on primary key conflict: If a primary key or constraint conflict occurs, the existing row with the duplicate primary key is deleted before the new data is inserted.
-
Overwrite: Deletes all data from the target table before writing the new data.
NoteWhen the output dataset is set to Source Dataset, the only supported loading policy is Update on primary key conflict.
Field Mapping
The PPT Parsing operator outputs the following fields:
-
markdown_url: The storage path of the Markdown file. -
markdown_content: The content of the Markdown file. This field is optional. If the content is too long, avoid mapping this field to the output dataset. -
image_folder_url: The storage path of the image folder.
By default, the operator's output fields are mapped to the fields with the same names in the output dataset. You can also manually select target fields for custom mapping. In addition, you can map passthrough fields from the source dataset to the target dataset. You can manage field mappings in the following ways:
-
Add Output Field: Click to add a new, empty field mapping row. This feature is available only when the output dataset is set to Other Datasets.
-
Batch Mapping: Click to choose batch manual mapping, same-name mapping, or same-row mapping. This feature is available only when the output dataset is set to Other Datasets.
-
Delete Mapping: Click the Delete icon to delete the field mapping for the corresponding row. However, you cannot delete mappings for the fixed output fields of an operator.
-
-
After you complete the configuration, click Save in the top menu bar of the canvas.
After configuring an individual operator, you can continue to build a complete workflow by adding upstream or downstream operators.
Appendix: PPT to Markdown mapping
|
PPT element |
Markdown output |
Notes |
|
Slide title |
|
Uses the content of the title placeholder. |
|
Subtitle |
|
Uses the content of the subtitle placeholder. |
|
Body text in text boxes |
Plain text paragraph. |
Multiple text boxes are ordered by their visual position (top to bottom, left to right). |
|
Bold/Italic |
|
Inline formatting is preserved. |
|
Ordered/Unordered lists |
|
Multi-level nested indentation is supported. |
|
Table |
Markdown table |
The operator expands merged cells. |
|
Embedded image |
|
The operator extracts the original image to Object Storage Service (OSS). |
|
Chart |
Attempts to extract the underlying data and convert it into a table and a rendered screenshot. |
If data extraction fails, only a screenshot is rendered. |
|
SmartArt |
Text nodes are extracted and converted into a hierarchical list. |
The graphical layout is ignored. |
|
Hyperlink |
|
The link destination is preserved. |
|
speaker notes |
|
The operator extracts speaker notes by default. You cannot disable this feature. |
|
Embedded audio/video |
|
The operator cannot extract this content directly and inserts a placeholder description instead. |
|
Blank Slide |
The operator skips the slide. |
No section is generated for the skipped slide. |
|
Animated elements |
Content is output sequentially based on the order of appearance of the elements. |
Elements such as images, tables, and text that appear sequentially through animation on the same Slide are fully parsed. |