Implement information extraction solutions 5.2 Extract content from documents
Each uploaded PDF is a loan package that contains a loan application form, several pay…
Study guide skill: Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction
Question B2-028
Each uploaded PDF is a loan package that contains a loan application form, several pay slips, and bank statements, sometimes with unrelated pages. With Content Understanding you must split each file by document type, extract fields from each part with the right analyzer, and avoid forcing unrelated pages into a category. How should you configure the analyzer?
Select one answer.
Answer: B
Content Understanding classification splits a file into segments when enableSegment is true, classifies each segment by the category descriptions, and routes it to the analyzer set in that category's analyzerId. Without an other category, all content is forced into one of the listed categories. With enableSegment false, the whole file gets a single category, and classification needs no training dataset.
Deep dive
How it works
A loan package is several documents in one PDF, which is exactly what Content Understanding classification with segmentation handles. Three settings on the analyzer do the work:
- contentCategories: one entry per document type (loan application, pay slip, bank statement), each with a description that tells the classifier what that type looks like, and an analyzerId that routes matching segments to a prebuilt or custom extraction analyzer.
- An "other" category: without it, all content is classified into one of your defined categories. Including other lets unrelated pages stay unmatched instead of being forced into "pay slip".
- enableSegment set to true: the file is treated as multiple documents combined together, and the service returns categories for the segments within it. The response includes page ranges for each identified document.
No training is involved. Classification doesn't require a training dataset, and you can define up to 200 category names and descriptions in the analyze operation. Note that the minimum classification unit for documents is a single page by default.
The other options, and when you'd use them
- Categories with analyzerId but enableSegment false: With enableSegment false, the entire input file is treated as a single document, so the whole package gets one category. That's for single-document files.
- A video analyzer with segmentation: Segmentation isn't video-only. Content Understanding classification lets you process complex documents and videos, and document classification and video segmentation share one design.
- Train a custom classification model first: Content Understanding classification doesn't require a training dataset. Category names and descriptions are the configuration.
Exam tip
Mixed documents in one file = contentCategories (description + analyzerId) + an "other" category + enableSegment true.
References
Last reviewed: