Skip to content

Commit 3882143

Browse files
add version info on models (Azure#18654)
1 parent 9eb1655 commit 3882143

File tree

1 file changed

+46
-10
lines changed
  • sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer

1 file changed

+46
-10
lines changed

sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ class Point(namedtuple("Point", "x y")):
132132
133133
:ivar float x: x-coordinate
134134
:ivar float y: y-coordinate
135+
136+
.. versionadded:: v2.1
137+
Support for *to_dict* and *from_dict* methods
135138
"""
136139

137140
__slots__ = ()
@@ -165,6 +168,9 @@ class FormPageRange(namedtuple("FormPageRange", "first_page_number last_page_num
165168
166169
:ivar int first_page_number: The first page number of the form.
167170
:ivar int last_page_number: The last page number of the form.
171+
172+
.. versionadded:: v2.1
173+
Support for *to_dict* and *from_dict* methods
168174
"""
169175

170176
__slots__ = ()
@@ -216,6 +222,9 @@ class FormElement(object):
216222
The kind of form element. Possible kinds are "word", "line", or "selectionMark" which
217223
correspond to a :class:`~azure.ai.formrecognizer.FormWord` :class:`~azure.ai.formrecognizer.FormLine`,
218224
or :class:`~azure.ai.formrecognizer.FormSelectionMark`, respectively.
225+
226+
.. versionadded:: v2.1
227+
Support for *to_dict* and *from_dict* methods
219228
"""
220229

221230
def __init__(self, **kwargs):
@@ -283,7 +292,8 @@ class RecognizedForm(object):
283292
words, selection marks, tables and page metadata.
284293
285294
.. versionadded:: v2.1
286-
The *form_type_confidence* and *model_id* properties
295+
The *form_type_confidence* and *model_id* properties, support for
296+
*to_dict* and *from_dict* methods
287297
"""
288298

289299
def __init__(self, **kwargs):
@@ -371,6 +381,9 @@ class FormField(object):
371381
dict[str, :class:`~azure.ai.formrecognizer.FormField`], or list[:class:`~azure.ai.formrecognizer.FormField`]
372382
:ivar float confidence:
373383
Measures the degree of certainty of the recognition result. Value is between [0.0, 1.0].
384+
385+
.. versionadded:: v2.1
386+
Support for *to_dict* and *from_dict* methods
374387
"""
375388

376389
def __init__(self, **kwargs):
@@ -490,7 +503,8 @@ class FieldData(object):
490503
~azure.ai.formrecognizer.FormLine, ~azure.ai.formrecognizer.FormSelectionMark]]
491504
492505
.. versionadded:: v2.1
493-
*FormSelectionMark* is added to the types returned in the list of field_elements
506+
*FormSelectionMark* is added to the types returned in the list of field_elements, support for
507+
*to_dict* and *from_dict* methods
494508
"""
495509

496510
def __init__(self, **kwargs):
@@ -611,7 +625,7 @@ class FormPage(object):
611625
:vartype selection_marks: list[~azure.ai.formrecognizer.FormSelectionMark]
612626
613627
.. versionadded:: v2.1
614-
*selection_marks* property
628+
*selection_marks* property, support for *to_dict* and *from_dict* methods
615629
"""
616630

617631
def __init__(self, **kwargs):
@@ -704,7 +718,7 @@ class FormLine(FormElement):
704718
:vartype appearance: ~azure.ai.formrecognizer.Appearance
705719
706720
.. versionadded:: v2.1
707-
*appearance* property
721+
*appearance* property, support for *to_dict* and *from_dict* methods
708722
"""
709723

710724
def __init__(self, **kwargs):
@@ -795,6 +809,9 @@ class FormWord(FormElement):
795809
:ivar int page_number:
796810
The 1-based number of the page in which this content is present.
797811
:ivar str kind: For FormWord, this is "word".
812+
813+
.. versionadded:: v2.1
814+
Support for *to_dict* and *from_dict* methods
798815
"""
799816

800817
def __init__(self, **kwargs):
@@ -867,6 +884,9 @@ class FormSelectionMark(FormElement):
867884
:ivar int page_number:
868885
The 1-based number of the page in which this content is present.
869886
:ivar str kind: For FormSelectionMark, this is "selectionMark".
887+
888+
.. versionadded:: v2.1
889+
Support for *to_dict* and *from_dict* methods
870890
"""
871891

872892
def __init__(self, **kwargs):
@@ -944,7 +964,7 @@ class FormTable(object):
944964
Units are in pixels for images and inches for PDF.
945965
946966
.. versionadded:: v2.1
947-
The *bounding_box* property.
967+
The *bounding_box* property, support for *to_dict* and *from_dict* methods
948968
"""
949969

950970
def __init__(self, **kwargs):
@@ -1030,7 +1050,8 @@ class FormTableCell(object): # pylint:disable=too-many-instance-attributes
10301050
~azure.ai.formrecognizer.FormLine, ~azure.ai.formrecognizer.FormSelectionMark]]
10311051
10321052
.. versionadded:: v2.1
1033-
*FormSelectionMark* is added to the types returned in the list of field_elements
1053+
*FormSelectionMark* is added to the types returned in the list of field_elements, support for
1054+
*to_dict* and *from_dict* methods
10341055
"""
10351056

10361057
def __init__(self, **kwargs):
@@ -1169,7 +1190,7 @@ class CustomFormModel(object):
11691190
:vartype properties: ~azure.ai.formrecognizer.CustomFormModelProperties
11701191
11711192
.. versionadded:: v2.1
1172-
The *model_name* and *properties* properties.
1193+
The *model_name* and *properties* properties, support for *to_dict* and *from_dict* methods
11731194
"""
11741195

11751196
def __init__(self, **kwargs):
@@ -1311,7 +1332,7 @@ class CustomFormSubmodel(object):
13111332
:ivar str form_type: Type of form this submodel recognizes.
13121333
13131334
.. versionadded:: v2.1
1314-
The *model_id* property
1335+
The *model_id* property, support for *to_dict* and *from_dict* methods
13151336
"""
13161337

13171338
def __init__(self, **kwargs):
@@ -1428,6 +1449,9 @@ class CustomFormModelField(object):
14281449
:ivar str label: The form fields label on the form.
14291450
:ivar str name: Canonical name; uniquely identifies a field within the form.
14301451
:ivar float accuracy: The estimated recognition accuracy for this field.
1452+
1453+
.. versionadded:: v2.1
1454+
Support for *to_dict* and *from_dict* methods
14311455
"""
14321456

14331457
def __init__(self, **kwargs):
@@ -1501,7 +1525,7 @@ class TrainingDocumentInfo(object):
15011525
The model ID that used the document to train.
15021526
15031527
.. versionadded:: v2.1
1504-
The *model_id* property
1528+
The *model_id* property, support for *to_dict* and *from_dict* methods
15051529
"""
15061530

15071531
def __init__(self, **kwargs):
@@ -1593,6 +1617,9 @@ class FormRecognizerError(object):
15931617
15941618
:ivar str code: Error code.
15951619
:ivar str message: Error message.
1620+
1621+
.. versionadded:: v2.1
1622+
Support for *to_dict* and *from_dict* methods
15961623
"""
15971624

15981625
def __init__(self, **kwargs):
@@ -1656,7 +1683,7 @@ class CustomFormModelInfo(object):
16561683
:vartype properties: ~azure.ai.formrecognizer.CustomFormModelProperties
16571684
16581685
.. versionadded:: v2.1
1659-
The *model_name* and *properties* properties
1686+
The *model_name* and *properties* properties, support for *to_dict* and *from_dict* methods
16601687
"""
16611688

16621689
def __init__(self, **kwargs):
@@ -1745,6 +1772,9 @@ class AccountProperties(object):
17451772
17461773
:ivar int custom_model_count: Current count of trained custom models.
17471774
:ivar int custom_model_limit: Max number of models that can be trained for this account.
1775+
1776+
.. versionadded:: v2.1
1777+
Support for *to_dict* and *from_dict* methods
17481778
"""
17491779

17501780
def __init__(self, **kwargs):
@@ -1794,6 +1824,9 @@ class CustomFormModelProperties(object):
17941824
"""Optional model properties.
17951825
17961826
:ivar bool is_composed_model: Is this model composed? (default: false).
1827+
1828+
.. versionadded:: v2.1
1829+
Support for *to_dict* and *from_dict* methods
17971830
"""
17981831

17991832
def __init__(self, **kwargs):
@@ -1841,6 +1874,9 @@ class TextAppearance(object):
18411874
:ivar str style_name: The text line style name.
18421875
Possible values include: "other", "handwriting".
18431876
:ivar float style_confidence: The confidence of text line style.
1877+
1878+
.. versionadded:: v2.1
1879+
Support for *to_dict* and *from_dict* methods
18441880
"""
18451881

18461882
def __init__(self, **kwargs):

0 commit comments

Comments
 (0)