Extraction de valeur de clé (ID inducteur)
L'extraction des valeurs de clé peut être utilisée pour identifier les valeurs des clés prédéfinies dans la documentation d'un pilote américain ou britannique. Par exemple, si un inducteur comprend une date d'émission, une région et une date d'expiration, le service de compréhension de documents peut identifier ces valeurs et les retourner en tant que paire de valeurs clés.
Les fonctionnalités prises en charge sont les suivantes :
- Extraire les valeurs des paires clé-valeur prédéfinies
- Polygones de liaison
- Note de fiabilité
Les champs pris en charge sont les suivants :
Champ | Description | Valeur de réponse d'API |
---|---|---|
FirstName | Prénom (prénom) figurant sur le document. | Texte extrait |
MiddleName | Autre prénom figurant sur le document (le cas échéant). | Texte extrait |
LastName | Nom (nom de la famille) figurant sur le document. | Texte extrait |
Pays | Pays figurant sur le document. | Code de pays ISO 3166-1 extrait |
DateofBirth | Date de naissance. | Date au format YYYY/MM/DD |
ExpiryDate | Date d'expiration indiquée sur le document. | Date au format YYYY/MM/DD |
IssueDate | Date d'émission indiquée sur le document. | Date au format YYYY/MM/DD |
Sexe | Sexe indiqué dans le document. | Texte extrait |
DocumentNumber | Numéro d'identification du document. | Texte extrait |
Adresse | Adresse figurant sur le document. | Texte extrait |
Région | Région indiquée sur le document. Par exemple, État ou territoire. | Texte extrait |
Exemple d'extraction de valeur de clé (ID inducteur)
Exemple d'utilisation de l'extraction de valeurs clés à partir de la documentation directrice dans le service de compréhension de documents.
- Document d'entrée
-
Entrée d'extraction de valeurs de clé (ID conducteur) de la demande d'API
:
{ "processorConfig": { "processorType": "GENERAL", "features": [ { "featureType": "KEY_VALUE_EXTRACTION" }, "documentType": "DRIVER_LICENSE" }, "inputLocation": { "sourceType": "OBJECT_STORAGE_LOCATIONS", "objectLocations": [ { "source": "OBJECT_STORAGE", "namespaceName": "", "bucketName": "", "objectName": "" } ] }, "compartmentId": "", "outputLocation": { "namespaceName": "", "bucketName": "", "prefix": "" } }
- Sortie :
- Réponse d'API :
{ "documentMetadata": { "pageCount": 1, "mimeType": "image/jpeg" }, "pages": [ { "pageNumber": 1, "detectedDocumentTypes": [ { "documentType": "DRIVER_LICENSE", "confidence": 0.9585071 }, { "documentType": "BANK_STATEMENT", "confidence": 0.010580908 }, { "documentType": "INVOICE", "confidence": 0.006787545 }, { "documentType": "TAX_FORM", "confidence": 0.005904464 }, { "documentType": "CHECK", "confidence": 0.0050073466 } ], "documentFields": [ { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "Region", "confidence": 0.89 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.024051961713598392, "y": 0.07871827327285588 }, { "x": 0.5100519525133396, "y": 0.07886743036052006 }, { "x": 0.5100430018604494, "y": 0.15142263403432707 }, { "x": 0.024043011060708188, "y": 0.15127347694666288 } ] }, "value": "SOUTH CAROLINA" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "DateOfBirth", "confidence": 0.9 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.4519959147410437, "y": 0.5331082961999155 }, { "x": 0.6059959118257354, "y": 0.5331555599684346 }, { "x": 0.605990463602237, "y": 0.5773195969872736 }, { "x": 0.4519904665175453, "y": 0.5772723332187545 } ] }, "value": "07/04/1970" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "IssueDate", "confidence": 0.89 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.4739889094657875, "y": 0.5898973814767827 }, { "x": 0.6259889065883404, "y": 0.5899440314301262 }, { "x": 0.6259834583648419, "y": 0.6341080684489652 }, { "x": 0.4739834612422891, "y": 0.6340614184956217 } ] }, "value": "10/01/2017" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "ExpiryDate", "confidence": 0.91 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.4979834607879553, "y": 0.6340687842777286 }, { "x": 0.6539834578347857, "y": 0.6341166618614232 }, { "x": 0.6539772312936447, "y": 0.6845898470258107 }, { "x": 0.4979772342468143, "y": 0.6845419694421161 } ] }, "value": "07/04/2025" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "Sex", "confidence": 0.88 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.4299752897399868, "y": 0.7002939700900176 }, { "x": 0.4519752893235141, "y": 0.7003007220569489 }, { "x": 0.45197023025883704, "y": 0.7413101850030137 }, { "x": 0.42997023067530965, "y": 0.7413034330360825 } ] }, "value": "F" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "DocumentId", "confidence": 0.92 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.4440297717099426, "y": 0.2586578966078565 }, { "x": 0.6340297681131335, "y": 0.2587162090495359 }, { "x": 0.6340227632543499, "y": 0.3154985423594718 }, { "x": 0.444022766851159, "y": 0.31544022991779236 } ] }, "value": "123456789" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "LastName", "confidence": 0.92 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.35402160107844666, "y": 0.3248763304532142 }, { "x": 0.4800215986931944, "y": 0.32491500080927527 }, { "x": 0.48001576131087464, "y": 0.3722336119008885 }, { "x": 0.354015763696127, "y": 0.3721949415448274 } ] }, "value": "SAMPLE" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "FirstName", "confidence": 0.89 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.35001576377184923, "y": 0.37219371391447625 }, { "x": 0.5340157602886237, "y": 0.372250184910629 }, { "x": 0.5340091445886613, "y": 0.4258779441477906 }, { "x": 0.3500091480718869, "y": 0.42582147315163793 } ] }, "value": "JANE MARIA" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "Address", "confidence": 0.9066667 }, "fieldValue": { "valueType": "STRING", "boundingPolygon": { "normalizedVertices": [ { "x": 0.3540099263138073, "y": 0.4195135526364407 }, { "x": 0.7260099192716337, "y": 0.4196277222590973 }, { "x": 0.7259978553481731, "y": 0.5174195185150979 }, { "x": 0.35399786239034653, "y": 0.5173053488924414 } ] }, "value": "123 MAIN STREET ANYTOWN, SC 123451111" } }, { "fieldType": "KEY_VALUE", "fieldLabel": { "name": "MiddleName", "confidence": 0 }, "fieldValue": { "valueType": "STRING" } } ] } ], "detectedDocumentTypes": [ { "documentType": "DRIVER_LICENSE", "confidence": 0.9585071 } ], "documentClassificationModelVersion": "*.*.*", "keyValueExtractionModelVersion": "*.*.*" }