Skip to content

Commit

Permalink
v4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
851996006 committed Apr 3, 2024
1 parent d733e6e commit a0a70c7
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 90 deletions.
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
## [project-title] Changelog
## [ Document intelligence code samples ] Changelog

<a name="x.y.z"></a>
# x.y.z (yyyy-mm-dd)
# 2024.04.03

*Features*
* ...
* [ Document intelligence code samples ] is a collection place that directly provides users with samples, improving usage efficiency.

*Bug Fixes*
* ...
* None

*Breaking Changes*
* ...
* Mainly Python, the organizational structure of the files has undergone major changes:
1. Classification according to different themes.
2. Each version occupies one branch.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to [project-title]
# Contributing to [document intelligence code samples]

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
Expand Down
23 changes: 7 additions & 16 deletions Python(v4.0)/Add-on_capabilities/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
---
page_type: sample
languages:
- python
products:
- azure
- azure-cognitive-services
- azure-document-intelligence
urlFragment: documentintelligence-samples
---


# Samples for Azure Document Intelligence client library for Python(Add-on capabilities)

Expand Down Expand Up @@ -41,12 +32,12 @@ pip install azure-ai-documentintelligence --pre

|File Name|**Usage scenarios**|
|----------------|-------------|
|[sample_analyze_addon_barcodes.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_barcodes.py)and [sample_analyze_addon_barcodes async.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_barcodes_async.py)|Extract barcode|
|[sample_analyze_addon_fonts.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_fonts.py) and [sample_analyze_addon_fonts_async.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_fonts_async.py)|Extract font property|
|[sample_analyze_addon_formulas.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_formulas.py) and [sample_analyze_addon_formulas_async.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_formulas_async.py)|Extract formula|
|[sample_analyze_addon_highres.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_highres.py) and [sample_analyze_addon_highres_async.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_highres_async.py)|Extract high resolution|
|[sample_analyze_addon_languages.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_languages.py) and [sample_analyze_addon_languages_async.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_languages_async.py)|Detact language|
|[sample_analyze_addon_query_fields.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_query_fields.py) and [sample_analyze_addon_query_fields_async.py](Python(v4.0)/Add-on_capabilities/sample_analyze_addon_query_fields_async.py)|Query fields|
|[sample_analyze_addon_barcodes.py](sample_analyze_addon_barcodes.py)and [sample_analyze_addon_barcodes async.py](sample_analyze_addon_barcodes_async.py)|Extract barcode|
|[sample_analyze_addon_fonts.py](sample_analyze_addon_fonts.py) and [sample_analyze_addon_fonts_async.py](sample_analyze_addon_fonts_async.py)|Extract font property|
|[sample_analyze_addon_formulas.py](sample_analyze_addon_formulas.py) and [sample_analyze_addon_formulas_async.py](sample_analyze_addon_formulas_async.py)|Extract formula|
|[sample_analyze_addon_highres.py](sample_analyze_addon_highres.py) and [sample_analyze_addon_highres_async.py](sample_analyze_addon_highres_async.py)|Extract high resolution|
|[sample_analyze_addon_languages.py](sample_analyze_addon_languages.py) and [sample_analyze_addon_languages_async.py](sample_analyze_addon_languages_async.py)|Detact language|
|[sample_analyze_addon_query_fields.py](sample_analyze_addon_query_fields.py) and [sample_analyze_addon_query_fields_async.py](sample_analyze_addon_query_fields_async.py)|Query fields|


## Next steps
Expand Down
22 changes: 6 additions & 16 deletions Python(v4.0)/Custom_model/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
---
page_type: sample
languages:
- python
products:
- azure
- azure-cognitive-services
- azure-document-intelligence
urlFragment: documentintelligence-samples
---

# Samples for Azure Document Intelligence client library for Python

# Samples for Azure Document Intelligence client library for Python(Custom model)

These code samples show common scenario operations with the Azure Document Intelligence client library.

Expand Down Expand Up @@ -41,10 +31,10 @@ pip install azure-ai-documentintelligence --pre

|File Name|**Usage scenarios**|
|----------------|-------------|
|[sample_analyze_custom_documents.py](Python(v4.0)/Custom_model/sample_analyze_custom_documents.py) and [sample_analyze_custom_documents_async.py](Python(v4.0)/Custom_model/sample_analyze_custom_documents_async.py)| Analyze a document with a custom built model. The document must be of the same type as the documents the custom model was built on.|
|[sample_classify_document.py](Python(v4.0)/Custom_model/sample_classify_document.py) and [sample_classify_document_async.py](Python(v4.0)/Custom_model/sample_classify_document_async.py)| Classify a document using a trained document classifier.|
|[sample_compose_model.py](Python(v4.0)/Custom_model/sample_compose_model.py) and [sample_compose_model_async.py](Python(v4.0)/Custom_model/sample_compose_model.py)|This is useful when you have built different models and want to aggregate a group of them into a single model that you (or a user) could use to analyze a document.|
|[sample_copy_model_to.py](Python(v4.0)/Custom_model/sample_copy_model_to.py) and [sample_copy_model_to_async.py](Python(v4.0)/Custom_model/sample_copy_model_to_async.py)|Copy a custom model from a source Form Recognizer resource to a target Form Recognizer resource.|
|[sample_analyze_custom_documents.py](sample_analyze_custom_documents.py) and [sample_analyze_custom_documents_async.py](sample_analyze_custom_documents_async.py)| Analyze a document with a custom built model. The document must be of the same type as the documents the custom model was built on.|
|[sample_classify_document.py](sample_classify_document.py) and [sample_classify_document_async.py](sample_classify_document_async.py)| Classify a document using a trained document classifier.|
|[sample_compose_model.py](sample_compose_model.py) and [sample_compose_model_async.py](sample_compose_model.py)|This is useful when you have built different models and want to aggregate a group of them into a single model that you (or a user) could use to analyze a document.|
|[sample_copy_model_to.py](sample_copy_model_to.py) and [sample_copy_model_to_async.py](sample_copy_model_to_async.py)|Copy a custom model from a source Form Recognizer resource to a target Form Recognizer resource.|

## Next steps

Expand Down
25 changes: 6 additions & 19 deletions Python(v4.0)/Layout_model/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
---
page_type: sample
languages:
- python
products:
- azure
- azure-cognitive-services
- azure-document-intelligence
urlFragment: documentintelligence-samples
---

# Samples for Azure Document Intelligence client library for Python

# Samples for Azure Document Intelligence client library for Python(Layout model)

These code samples show common scenario operations with the Azure Document Intelligence client library.

Expand Down Expand Up @@ -37,16 +27,13 @@ pip install azure-ai-documentintelligence --pre

1. Open a terminal window and `cd` to the directory that the samples are saved in.
2. Set the environment variables specified in the sample file you wish to run.
3. Follow the usage described in the file, e.g. `python sample_analyze_receipts.py`
3. Follow the usage described in the file, e.g. `python sample_analyze_layout.py`

#### **Read model**
|File Name|**Usage scenarios**|
|----------------|-------------|
|[s.py]() and [s_async.py]()|Analyze document text, selection marks, tables, and pre-trained fields and values pertaining to English invoices using a prebuilt model|
|[s.py]() and [s_async.py]()|Analyze document text and pre-trained fields and values pertaining to English business cards using a prebuilt model|
|[s.py]() and [c.py]()|Analyze document text and pre-trained fields and values pertaining to US driver licenses and international passports using a prebuilt model|
|[s.py]() and [s_async.py]()|Analyze document text and pre-trained fields and values pertaining to English sales receipts using a prebuilt model|
|[2.py]() and [2_async.py]()|Analyze document text and pre-trained fields and values pertaining to US tax W-2 forms using a prebuilt model|
|[sample_analyze_layout.py](sample_analyze_layout.py) and [sample_analyze_layout async.py](sample_analyze_layout_async.py) |Extract text, selection marks, and table structures in a document|
|[sample_analyze_general_documents.py](sample_analyze_general_documents.py) and [sample_analyze_general_documents_async.py](sample_analyze_general_documents_async.py) |Extract key-value pairs, selection marks, text, tables, and structure from documents|
|[sample_analyze_documents_output_in_markdown.py](sample_analyze_documents_output_in_markdown.py) and [sample_analyze_documents_output_in_markdown_async.py](sample_analyze_documents_output_in_markdown_async.py) |Use markdown output to enhance the capabilities of Azure Document Intelligence Layout model and subsequently feed this refined data into Azure OpenAI service for comprehensive information extraction.|

## Next steps

Expand Down
24 changes: 6 additions & 18 deletions Python(v4.0)/Prebuilt_model/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
---
page_type: sample
languages:
- python
products:
- azure
- azure-cognitive-services
- azure-document-intelligence
urlFragment: documentintelligence-samples
---

# Samples for Azure Document Intelligence client library for Python

# Samples for Azure Document Intelligence client library for Python(Prebuilt model)

These code samples show common scenario operations with the Azure Document Intelligence client library.

Expand Down Expand Up @@ -39,14 +29,12 @@ pip install azure-ai-documentintelligence --pre
2. Set the environment variables specified in the sample file you wish to run.
3. Follow the usage described in the file, e.g. `python sample_analyze_receipts.py`

#### **Read model**
|File Name|**Usage scenarios**|
|----------------|-------------|
|[s.py]() and [s_async.py]()|Analyze document text, selection marks, tables, and pre-trained fields and values pertaining to English invoices using a prebuilt model|
|[s.py]() and [s_async.py]()|Analyze document text and pre-trained fields and values pertaining to English business cards using a prebuilt model|
|[s.py]() and [c.py]()|Analyze document text and pre-trained fields and values pertaining to US driver licenses and international passports using a prebuilt model|
|[s.py]() and [s_async.py]()|Analyze document text and pre-trained fields and values pertaining to English sales receipts using a prebuilt model|
|[2.py]() and [2_async.py]()|Analyze document text and pre-trained fields and values pertaining to US tax W-2 forms using a prebuilt model|
|[sample_analyze_invoices.py](sample_analyze_invoices.py) and [sample_analyze_invoices_async.py](sample_analyze_invoices_async.py) |Analyze document text, selection marks, tables, and pre-trained fields and values pertaining to English invoices using a prebuilt model|
|[sample_analyze_identity_documents.py](sample_analyze_identity_documents.py) and [sample_analyze_identity_documents_async.py](sample_analyze_identity_documents_async.py) |Analyze document text and pre-trained fields and values pertaining to US driver licenses and international passports using a prebuilt model|
|[sample_analyze_receipts.py](sample_analyze_receipts.py) and [sample_analyze_receipts_async.py](sample_analyze_receipts_async.py) |Analyze document text and pre-trained fields and values pertaining to English sales receipts using a prebuilt model|
|[sample_analyze_tax_us_w2.py](sample_analyze_tax_us_w2.py) and [sample_analyze_tax_us_w2_async.py](sample_analyze_tax_us_w2_async.py) |Analyze document text and pre-trained fields and values pertaining to US tax W-2 forms using a prebuilt model|

## Next steps

Expand Down
1 change: 0 additions & 1 deletion Python(v4.0)/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ pip install azure-ai-documentintelligence --pre
|File Name|**Usage scenarios**|
|----------------|-------------|
|[sample_analyze_invoices.py](Prebuilt_model/sample_analyze_invoices.py) and [sample_analyze_invoices_async.py](Prebuilt_model/sample_analyze_invoices_async.py) |Analyze document text, selection marks, tables, and pre-trained fields and values pertaining to English invoices using a prebuilt model|
|[sample_analyze_business_cards.py](Prebuilt_model/sample_analyze_business_cards.py) and [sample_analyze_business_cards_async.py](Prebuilt_model/sample_analyze_business_cards_async.py) |Analyze document text and pre-trained fields and values pertaining to English business cards using a prebuilt model|
|[sample_analyze_identity_documents.py](Prebuilt_model/sample_analyze_identity_documents.py) and [sample_analyze_identity_documents_async.py](Prebuilt_model/sample_analyze_identity_documents_async.py) |Analyze document text and pre-trained fields and values pertaining to US driver licenses and international passports using a prebuilt model|
|[sample_analyze_receipts.py](Prebuilt_model/sample_analyze_receipts.py) and [sample_analyze_receipts_async.py](Prebuilt_model/sample_analyze_receipts_async.py) |Analyze document text and pre-trained fields and values pertaining to English sales receipts using a prebuilt model|
|[sample_analyze_tax_us_w2.py](Prebuilt_model/sample_analyze_tax_us_w2.py) and [sample_analyze_tax_us_w2_async.py](Prebuilt_model/sample_analyze_tax_us_w2_async.py) |Analyze document text and pre-trained fields and values pertaining to US tax W-2 forms using a prebuilt model|
Expand Down
13 changes: 1 addition & 12 deletions Python(v4.0)/Read_model/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
---
page_type: sample
languages:
- python
products:
- azure
- azure-cognitive-services
- azure-document-intelligence
urlFragment: documentintelligence-samples
---

# Samples for Azure Document Intelligence client library for Python(Read model)

These code samples show common scenario operations with the Azure Document Intelligence client library.
Expand Down Expand Up @@ -42,7 +31,7 @@ pip install azure-ai-documentintelligence --pre

|File Name|**Usage scenarios**|
|----------------|-------------|
|[sample_analyze_read.py](Python(v4.0)/Read_model/sample_analyze_read.py/) and [sample_analyze_read async.py](Python(v4.0)/Read_model/sample_analyze_read_async.py/)|Read document elements, such as pages and detected languages|
|[sample_analyze_read.py](sample_analyze_read.py/) and [sample_analyze_read async.py](sample_analyze_read_async.py/)|Read document elements, such as pages and detected languages|

## Next steps

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pip install azure-ai-documentintelligence --pre
|File Name|**Usage scenarios**|
|----------------|-------------|
|[sample_analyze_layout.py](Python(v4.0)/Layout_model/sample_analyze_layout.py) and [sample_analyze_layout async.py](Python(v4.0)/Layout_model/sample_analyze_layout_async.py/) |Extract text, selection marks, and table structures in a document|
|[sample_analyze_general_documents.py](Python(v4.0)/Layout_model/sample_analyze_general_documents.py) and [sample_analyze_general_documents_async.py](Python(v4.0)/Layout_model/ssample_analyze_general_documents_async.py/) |Extract key-value pairs, selection marks, text, tables, and structure from documents|
|[sample_analyze_general_documents.py](Python(v4.0)/Layout_model/sample_analyze_general_documents.py) and [sample_analyze_general_documents_async.py](Python(v4.0)/Layout_model/sample_analyze_general_documents_async.py/) |Extract key-value pairs, selection marks, text, tables, and structure from documents|
|[sample_analyze_documents_output_in_markdown.py](Python(v4.0)/Layout_model/sample_analyze_documents_output_in_markdown.py) and [sample_analyze_documents_output_in_markdown_async.py](Python(v4.0)/Layout_model/sample_analyze_documents_output_in_markdown_async.py/) |Use markdown output to enhance the capabilities of Azure Document Intelligence Layout model and subsequently feed this refined data into Azure OpenAI service for comprehensive information extraction.|


Expand All @@ -78,7 +78,6 @@ pip install azure-ai-documentintelligence --pre
|File Name|**Usage scenarios**|
|----------------|-------------|
|[sample_analyze_invoices.py](Python(v4.0)/Prebuilt_model/sample_analyze_invoices.py) and [sample_analyze_invoices_async.py](Python(v4.0)/Prebuilt_model/sample_analyze_invoices_async.py) |Analyze document text, selection marks, tables, and pre-trained fields and values pertaining to English invoices using a prebuilt model|
|[sample_analyze_business_cards.py](Python(v4.0)/Prebuilt_model/sample_analyze_business_cards.py) and [sample_analyze_business_cards_async.py](Python(v4.0)/Prebuilt_model/sample_analyze_business_cards_async.py) |Analyze document text and pre-trained fields and values pertaining to English business cards using a prebuilt model|
|[sample_analyze_identity_documents.py](Python(v4.0)/Prebuilt_model/sample_analyze_identity_documents.py) and [sample_analyze_identity_documents_async.py](Python(v4.0)/Prebuilt_model/sample_analyze_identity_documents_async.py) |Analyze document text and pre-trained fields and values pertaining to US driver licenses and international passports using a prebuilt model|
|[sample_analyze_receipts.py](Python(v4.0)/Prebuilt_model/sample_analyze_receipts.py) and [sample_analyze_receipts_async.py](Python(v4.0)/Prebuilt_model/sample_analyze_receipts_async.py) |Analyze document text and pre-trained fields and values pertaining to English sales receipts using a prebuilt model|
|[sample_analyze_tax_us_w2.py](Python(v4.0)/Prebuilt_model/sample_analyze_tax_us_w2.py) and [sample_analyze_tax_us_w2_async.py](Python(v4.0)/Prebuilt_model/sample_analyze_tax_us_w2_async.py) |Analyze document text and pre-trained fields and values pertaining to US tax W-2 forms using a prebuilt model|
Expand Down

0 comments on commit a0a70c7

Please sign in to comment.