Document Classifiers - Build Classifier
Skapar en anpassad dokumentklassificerare.
POST {endpoint}/formrecognizer/documentClassifiers:build?api-version=2023-07-31
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
Cognitive Services-slutpunkter som stöds (protokoll och värdnamn, till exempel: https://westus2.api.cognitive.microsoft.com). |
api-version
|
query | True |
string |
Begärd API-version. |
Begärandehuvud
Name | Obligatorisk | Typ | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Den hemliga nyckeln för din Azure Cognitive Services-prenumeration. |
Begärandetext
Name | Obligatorisk | Typ | Description |
---|---|---|---|
classifierId | True |
string |
Unikt dokumentklassificerarenamn. |
docTypes | True |
<string,
Classifier |
Lista över dokumenttyper att klassificera mot. |
description |
string |
Beskrivning av dokumentklassificerare. |
Svar
Name | Typ | Description |
---|---|---|
202 Accepted |
Begäran har placerats i kö. Headers Operation-Location: string |
|
Other Status Codes |
Ett fel påträffades. |
Säkerhet
Ocp-Apim-Subscription-Key
Den hemliga nyckeln för din Azure Cognitive Services-prenumeration.
Type:
apiKey
In:
header
Exempel
Build Document Classifier
Sample Request
POST https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentClassifiers:build?api-version=2023-07-31
{
"classifierId": "myClassifier",
"description": "Classifier description",
"docTypes": {
"formA": {
"azureBlobSource": {
"containerUrl": "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken",
"prefix": "formADocs/"
}
},
"formB": {
"azureBlobFileListSource": {
"containerUrl": "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken",
"fileList": "formB.jsonl"
}
}
}
}
Sample Response
Operation-Location: https://myendpoint.cognitiveservices.azure.com/formrecognizer/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2023-07-31
Definitioner
Name | Description |
---|---|
Azure |
Azure Blob Storage innehåll. |
Azure |
Fillista i Azure Blob Storage. |
Build |
Begär brödtext för att skapa en ny anpassad dokumentklassificerare. |
Classifier |
Information om dokumenttyp för klassificerare. |
Error |
Felinformation. |
Error |
Felsvarsobjekt. |
Inner |
Detaljerat fel. |
AzureBlobContentSource
Azure Blob Storage innehåll.
Name | Typ | Description |
---|---|---|
containerUrl |
string |
Azure Blob Storage container-URL. |
prefix |
string |
Prefix för blobnamn. |
AzureBlobFileListContentSource
Fillista i Azure Blob Storage.
Name | Typ | Description |
---|---|---|
containerUrl |
string |
Azure Blob Storage container-URL. |
fileList |
string |
Sökväg till en JSONL-fil i containern som anger en delmängd av dokument för träning. |
BuildDocumentClassifierRequest
Begär brödtext för att skapa en ny anpassad dokumentklassificerare.
Name | Typ | Description |
---|---|---|
classifierId |
string |
Unikt dokumentklassificerarenamn. |
description |
string |
Beskrivning av dokumentklassificerare. |
docTypes |
<string,
Classifier |
Lista över dokumenttyper att klassificera mot. |
ClassifierDocumentTypeDetails
Information om dokumenttyp för klassificerare.
Name | Typ | Description |
---|---|---|
azureBlobFileListSource |
Azure Blob Storage fillista som anger träningsdata för en dokumenttyp för en klassificerare. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
|
azureBlobSource |
Azure Blob Storage plats som innehåller träningsdata för en dokumenttyp för klassificerare. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
Error
Felinformation.
Name | Typ | Description |
---|---|---|
code |
string |
Felkod. |
details |
Error[] |
Lista över detaljerade fel. |
innererror |
Detaljerat fel. |
|
message |
string |
Felmeddelande. |
target |
string |
Målet för felet. |
ErrorResponse
Felsvarsobjekt.
Name | Typ | Description |
---|---|---|
error |
Felinformation. |
InnerError
Detaljerat fel.
Name | Typ | Description |
---|---|---|
code |
string |
Felkod. |
innererror |
Detaljerat fel. |
|
message |
string |
Felmeddelande. |