Skip to content

Commit

Permalink
CI Update
Browse files Browse the repository at this point in the history
  • Loading branch information
VSC-Service-Account committed Jan 14, 2022
1 parent f98ee84 commit 336ca30
Show file tree
Hide file tree
Showing 4,419 changed files with 26,744 additions and 3,715 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members:
fullName: "com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeBusinessCards(Flux<ByteBuffer> businessCard, long length)"
name: "beginRecognizeBusinessCards(Flux<ByteBuffer> businessCard, long length)"
nameWithType: "FormRecognizerAsyncClient.beginRecognizeBusinessCards(Flux<ByteBuffer> businessCard, long length)"
summary: "Recognizes business card data using optical character recognition (OCR) and a prebuilt business card trained model.\n\nThe service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.\n\nSee [here][] for fields found on a business card. Note that the `businessCard` passed must be replayable if retries are enabled (the default). In other words, the `Flux` must produce the same data each time it is subscribed to.\n\n**Code sample**\n\n```java\nFile businessCard = new File(\"{local/file_path/fileName.jpg}\");\n Flux<ByteBuffer> buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(businessCard.toPath())));\n // if training polling operation completed, retrieve the final result.\n formRecognizerAsyncClient.beginRecognizeBusinessCards(buffer, businessCard.length())\n .flatMap(AsyncPollResponse::getFinalResult)\n .subscribe(recognizedBusinessCards -> {\n for (int i = 0; i < recognizedBusinessCards.size(); i++) {\n RecognizedForm recognizedForm = recognizedBusinessCards.get(i);\n Map<String, FormField> recognizedFields = recognizedForm.getFields();\n System.out.printf(\"----------- Recognized Business Card page %d -----------%n\", i);\n FormField contactNamesFormField = recognizedFields.get(\"ContactNames\");\n if (contactNamesFormField != null) {\n if (FieldValueType.LIST == contactNamesFormField.getValue().getValueType()) {\n List<FormField> contactNamesList = contactNamesFormField.getValue().asList();\n contactNamesList.stream()\n .filter(contactName -> FieldValueType.MAP == contactName.getValue().getValueType())\n .map(contactName -> {\n System.out.printf(\"Contact name: %s%n\", contactName.getValueData().getText());\n return contactName.getValue().asMap();\n })\n .forEach(contactNamesMap -> contactNamesMap.forEach((key, contactName) -> {\n if (\"FirstName\".equals(key)) {\n if (FieldValueType.STRING == contactName.getValue().getValueType()) {\n String firstName = contactName.getValue().asString();\n System.out.printf(\"\\tFirst Name: %s, confidence: %.2f%n\",\n firstName, contactName.getConfidence());\n }\n }\n if (\"LastName\".equals(key)) {\n if (FieldValueType.STRING == contactName.getValue().getValueType()) {\n String lastName = contactName.getValue().asString();\n System.out.printf(\"\\tLast Name: %s, confidence: %.2f%n\",\n lastName, contactName.getConfidence());\n }\n }\n }));\n }\n }\n FormField jobTitles = recognizedFields.get(\"JobTitles\");\n if (jobTitles != null) {\n if (FieldValueType.LIST == jobTitles.getValue().getValueType()) {\n List<FormField> jobTitlesItems = jobTitles.getValue().asList();\n jobTitlesItems.forEach(jobTitlesItem -> {\n if (FieldValueType.STRING == jobTitlesItem.getValue().getValueType()) {\n String jobTitle = jobTitlesItem.getValue().asString();\n System.out.printf(\"Job Title: %s, confidence: %.2f%n\",\n jobTitle, jobTitlesItem.getConfidence());\n }\n });\n }\n }\n }\n });\n```\n\n\n[here]: https://aka.ms/formrecognizer/businesscardfields"
summary: "Recognizes business card data using optical character recognition (OCR) and a prebuilt business card trained model.\n\nThe service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.\n\nSee [here][] for fields found on a business card. Note that the `businessCard` passed must be replayable if retries are enabled (the default). In other words, the `Flux` must produce the same data each time it is subscribed to.\n\n**Code sample**\n\n\\{@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeBusinessCards\\#Flux-long\\}\n\n\n[here]: https://aka.ms/formrecognizer/businesscardfields"
parameters:
- description: "The data of the document to recognize business card information from."
name: "businessCard"
Expand All @@ -24,7 +24,7 @@ members:
fullName: "com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeBusinessCards(Flux<ByteBuffer> businessCard, long length, RecognizeBusinessCardsOptions recognizeBusinessCardsOptions)"
name: "beginRecognizeBusinessCards(Flux<ByteBuffer> businessCard, long length, RecognizeBusinessCardsOptions recognizeBusinessCardsOptions)"
nameWithType: "FormRecognizerAsyncClient.beginRecognizeBusinessCards(Flux<ByteBuffer> businessCard, long length, RecognizeBusinessCardsOptions recognizeBusinessCardsOptions)"
summary: "Recognizes business card data from documents using optical character recognition (OCR) and a prebuilt business card trained model.\n\nThe service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.\n\nSee [here][] for fields found on a business card. Note that the `businessCard` passed must be replayable if retries are enabled (the default). In other words, the `Flux` must produce the same data each time it is subscribed to.\n\n**Code sample**\n\n```java\nFile businessCard = new File(\"{local/file_path/fileName.jpg}\");\n boolean includeFieldElements = true;\n // Utility method to convert input stream to Byte buffer\n Flux<ByteBuffer> buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(businessCard.toPath())));\n // if training polling operation completed, retrieve the final result.\n formRecognizerAsyncClient.beginRecognizeBusinessCards(buffer, businessCard.length(),\n new RecognizeBusinessCardsOptions()\n .setContentType(FormContentType.IMAGE_JPEG)\n .setFieldElementsIncluded(includeFieldElements))\n .setPollInterval(Duration.ofSeconds(5))\n .flatMap(AsyncPollResponse::getFinalResult)\n .subscribe(recognizedBusinessCards -> {\n for (int i = 0; i < recognizedBusinessCards.size(); i++) {\n RecognizedForm recognizedForm = recognizedBusinessCards.get(i);\n Map<String, FormField> recognizedFields = recognizedForm.getFields();\n System.out.printf(\"----------- Recognized Business Card page %d -----------%n\", i);\n FormField contactNamesFormField = recognizedFields.get(\"ContactNames\");\n if (contactNamesFormField != null) {\n if (FieldValueType.LIST == contactNamesFormField.getValue().getValueType()) {\n List<FormField> contactNamesList = contactNamesFormField.getValue().asList();\n contactNamesList.stream()\n .filter(contactName -> FieldValueType.MAP == contactName.getValue().getValueType())\n .map(contactName -> {\n System.out.printf(\"Contact name: %s%n\", contactName.getValueData().getText());\n return contactName.getValue().asMap();\n })\n .forEach(contactNamesMap -> contactNamesMap.forEach((key, contactName) -> {\n if (\"FirstName\".equals(key)) {\n if (FieldValueType.STRING == contactName.getValue().getValueType()) {\n String firstName = contactName.getValue().asString();\n System.out.printf(\"\\tFirst Name: %s, confidence: %.2f%n\",\n firstName, contactName.getConfidence());\n }\n }\n if (\"LastName\".equals(key)) {\n if (FieldValueType.STRING == contactName.getValue().getValueType()) {\n String lastName = contactName.getValue().asString();\n System.out.printf(\"\\tLast Name: %s, confidence: %.2f%n\",\n lastName, contactName.getConfidence());\n }\n }\n }));\n }\n }\n FormField jobTitles = recognizedFields.get(\"JobTitles\");\n if (jobTitles != null) {\n if (FieldValueType.LIST == jobTitles.getValue().getValueType()) {\n List<FormField> jobTitlesItems = jobTitles.getValue().asList();\n jobTitlesItems.forEach(jobTitlesItem -> {\n if (FieldValueType.STRING == jobTitlesItem.getValue().getValueType()) {\n String jobTitle = jobTitlesItem.getValue().asString();\n System.out.printf(\"Job Title: %s, confidence: %.2f%n\",\n jobTitle, jobTitlesItem.getConfidence());\n }\n });\n }\n }\n }\n });\n```\n\n\n[here]: https://aka.ms/formrecognizer/businesscardfields"
summary: "Recognizes business card data from documents using optical character recognition (OCR) and a prebuilt business card trained model.\n\nThe service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.\n\nSee [here][] for fields found on a business card. Note that the `businessCard` passed must be replayable if retries are enabled (the default). In other words, the `Flux` must produce the same data each time it is subscribed to.\n\n**Code sample**\n\n\\{@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeBusinessCards\\#Flux-long-RecognizeBusinessCardsOptions\\}\n\n\n[here]: https://aka.ms/formrecognizer/businesscardfields"
parameters:
- description: "The data of the document to recognize business card information from."
name: "businessCard"
Expand All @@ -42,4 +42,4 @@ members:
type: "method"
metadata: {}
package: "com.azure.ai.formrecognizer"
artifact: com.azure:azure-ai-formrecognizer:3.1.6
artifact: com.azure:azure-ai-formrecognizer:3.1.7
Loading

0 comments on commit 336ca30

Please sign in to comment.