mercredi 27 juillet 2022

Does Azure Form Recognizer 3.0 or 4.0 support key-value pairs for questions and checkboxes in surveys?

I know since version 2.1 released, Form Recognizer now supports checkbox, selection mark, and radio button detection. Using C#, I am trying to extract survey data out from a lot of different applications. The only downside is I do not know how many different templates exist for these applications. Form Recognizer does a good job of recognizing question and answer pairs as long as there are no checkboxes associated with them. For the checkboxes, both prebuilt templates "general-document" and "layout" can handle checkbox detection. However, it only marks the state of the checkbox as "selected" or "unselected". I need the JSON output to combine the checkbox state with the question and answer value that it is associated with. Right now, having the checkbox states alone do not provide any value as I do not know what the answer is attached to. As you can imagine, there are a lot of questions with checkbox answers. It would be very difficult to track which checkbox is associated with which question in the JSON output. Is there any workaround to give a key-value pair output for questions and checkbox answers?

I will show a random example of the survey questions here for further clarification. On the actual application (which I can't show for privacy), they are real checkboxes. For this example, these numbers are made up:

"Do you like ice cream?" YES[•] NO[]

"If you answered yes to the previous questions, what flavor do you like?" VANILLA[] CHOCOLATE[•] OTHER[]

The output looks something like this:

"selectionMarks": [
  {
    "state": "selected",
    "polygon": [
      217,
      862,
      254,
      862,
      254,
      899,
      217,
      899
    ],
    "confidence": 0.995,
    "span": {
      "offset": 1421,
      "length": 12
    }
  },
  {
    "state": "unselected",
    "polygon": [
      225,
      868,
      257,
      868,
      257,
      899,
      225,
      899
    ],
    "confidence": 0.995,
    "span": {
      "offset": 1421,
      "length": 12
    }
  },

etc.




Aucun commentaire:

Enregistrer un commentaire