Skip to content

Commit 672fb00

Browse files
refine instruction by comments
1 parent 948aeee commit 672fb00

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ Azure AI Content Understanding is a new Generative AI-based [Azure AI service](h
120120
| --- | --- |
121121
| [content_extraction.ipynb](notebooks/content_extraction.ipynb) | In this sample we will show content understanding API can help you get semantic information from your file. For example OCR with table in document, audio transcription, and face analysis in video. |
122122
| [field_extraction.ipynb](notebooks/field_extraction.ipynb) | In this sample we will show how to create an analyzer to extract fields in your file. For example invoice amount in the document, how many people in an image, names mentioned in an audio, or summary of a video. You can customize the fields by creating your own analyzer template. |
123+
| [classifier.ipynb](notebooks/classifier.ipynb) | This sample will demo how to (1) create a classifier to categorize documents, (2) create a custom analyzer to extract specific fields, and (3) combine classifier and analyzers to classify, optionally split, and analyze documents in a flexible processing pipeline. |
123124
| [conversational_field_extraction.ipynb](notebooks/conversational_field_extraction.ipynb) | This sample shows you how to evaluate conversational audio data that has previously been transcribed with Content Understanding or Azure AI Speech in in an efficient way to optimize processing quality. This also allows you to re-analyze data in a cost-efficient way. This sample is based on the [field_extraction.ipynb](notebooks/field_extraction.ipynb) sample. |
124125
| [analyzer_training.ipynb](notebooks/analyzer_training.ipynb) | If you want to futher boost the performance for field extraction, we can do training when you provide few labeled samples to the API. Note: This feature is available to document scenario now. |
125126
| [management.ipynb](notebooks/management.ipynb) | This sample will demo how to create a minimal analyzer, list all the analyzers in your resource, and delete the analyzer you don't need. |
126-
| [build_person_directory.ipynb](notebooks/build_person_directory.ipynb) | This sample will demo how to enroll people’s faces from images and build a Person Directory. |
127-
| [classifier.ipynb](notebooks/classifier.ipynb) | This sample will demo how to (1) create a classifier to categorize documents, (2) create a custom analyzer to extract specific fields, and (3) combine classifier and analyzer for intelligent document processing. | |
127+
| [build_person_directory.ipynb](notebooks/build_person_directory.ipynb) | This sample will demo how to enroll people’s faces from images and build a Person Directory. ||
128128

129129
## More Samples using Azure Content Understanding
130130
[Azure Search with Content Understanding](https://github.com/Azure-Samples/azure-ai-search-with-content-understanding-python)

notebooks/classifier.ipynb

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
"This notebook demonstrates how to use Azure AI Content Understanding service to:\n",
1010
"1. Create a classifier to categorize documents\n",
1111
"2. Create a custom analyzer to extract specific fields\n",
12-
"3. Combine classifier and analyzer for intelligent document processing\n",
12+
"3. Combine classifier and analyzers to classify, optionally split, and analyze documents in a flexible processing pipeline\n",
13+
"\n",
14+
"If you’d like to learn more before getting started, see the official documentation:\n",
15+
"[Understanding Classifiers in Azure AI Services](https://learn.microsoft.com/en-us/azure/ai-services/content-understanding/concepts/classifier)\n",
1316
"\n",
1417
"## Prerequisites\n",
15-
"- Azure subscription with access to Azure AI services\n",
16-
"- Python 3.8 or higher\n",
17-
"- A PDF document for testing (sample included)\n"
18+
"1. Ensure Azure AI service is configured following [steps](../README.md#configure-azure-ai-service-resource)\n",
19+
"2. Install the required packages to run the sample.\n"
1820
]
1921
},
2022
{
@@ -129,10 +131,16 @@
129131
"\n",
130132
"The classifier schema defines:\n",
131133
"- **Categories**: Document types to classify (e.g., Legal, Medical)\n",
132-
"- **Split Mode**: How to split multi-page documents\n",
133-
" - `\"auto\"`: Automatically split based on content\n",
134-
" - `\"none\"`: Don't split\n",
135-
" - `\"perPage\"`: Split every page"
134+
" - **description (Optional)**: An optional field used to provide additional context or hints for categorizing or splitting documents. This can be helpful when the category name alone isn’t descriptive enough. If the category name is already clear and self-explanatory, this field can be omitted.\n",
135+
"- **splitMode Options**: Defines how multi-page documents should be split before classification or analysis.\n",
136+
" - `\"auto\"`: Automatically split based on content. \n",
137+
" For example, if two categories are defined as “invoice” and “application form”:\n",
138+
" - A PDF with only one invoice will be classified as a single document.\n",
139+
" - A PDF containing two invoices and one application form will be automatically split into three classified sections.\n",
140+
" - `\"none\"`: No splitting. \n",
141+
" The entire multi-page document is treated as a single unit for classification and analysis.\n",
142+
" - `\"perPage\"`: Split by page. \n",
143+
" Each page is treated as a separate document. This is useful when you’ve built custom analyzers designed to operate on a per-page basis."
136144
]
137145
},
138146
{
@@ -171,7 +179,12 @@
171179
"source": [
172180
"## 5. Initialize Content Understanding Client\n",
173181
"\n",
174-
"Create the client that will communicate with Azure AI services."
182+
"Create the client that will communicate with Azure AI services.\n",
183+
"\n",
184+
"⚠️ Important:\n",
185+
"You must update the code below to match your Azure authentication method.\n",
186+
"Look for the `# IMPORTANT` comments and modify those sections accordingly.\n",
187+
"If you skip this step, the sample may not run correctly."
175188
]
176189
},
177190
{

0 commit comments

Comments
 (0)