| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | namespace Azure.AI.FormRecognizer.Models |
| | 5 | | { |
| | 6 | | /// <summary> |
| | 7 | | /// Represents a form element recognized from the input document. Its text can be a line, |
| | 8 | | /// a word, the content of a table cell, etc. |
| | 9 | | /// </summary> |
| | 10 | | public abstract class FormElement |
| | 11 | | { |
| 25076 | 12 | | internal FormElement(BoundingBox boundingBox, int pageNumber, string text) |
| | 13 | | { |
| 25076 | 14 | | BoundingBox = boundingBox; |
| 25076 | 15 | | PageNumber = pageNumber; |
| 25076 | 16 | | Text = text; |
| 25076 | 17 | | } |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// The quadrilateral bounding box that outlines the text of this element. Units are in pixels for |
| | 21 | | /// images and inches for PDF. The <see cref="LengthUnit"/> type of a recognized page can be found |
| | 22 | | /// at <see cref="FormPage.Unit"/>. |
| | 23 | | /// </summary> |
| 41840 | 24 | | public BoundingBox BoundingBox { get; } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// The 1-based number of the page in which this element is present. |
| | 28 | | /// </summary> |
| 19980 | 29 | | public int PageNumber { get; } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// The text of this form element. It can be a whole line or a single word. |
| | 33 | | /// </summary> |
| 22304 | 34 | | public string Text { get; } |
| | 35 | | } |
| | 36 | | } |