-
Notifications
You must be signed in to change notification settings - Fork 10
/
rt-text.yml
179 lines (171 loc) · 6 KB
/
rt-text.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
openapi: 3.0.3
components:
schemas:
TextResult:
title: "Text"
allOf:
- type: object
required:
- Text
properties:
Text:
$ref: "#/components/schemas/Text"
- $ref: "./rt.yml#/components/schemas/ResultItem"
Text:
type: object
description: "Contains all document text fields data with validity and cross-source compare checks"
required:
- status
- validityStatus
- comparisonStatus
- fieldList
- availableSourceList
properties:
status:
description: "Overall status of all checks from all text fields"
$ref: "./common.yml#/components/schemas/CheckResult"
validityStatus:
description: "Overall status of validity from all text fields from all sources"
$ref: "./common.yml#/components/schemas/CheckResult"
comparisonStatus:
description: "Overall status of data comparison from different sources for each text field"
$ref: "./common.yml#/components/schemas/CheckResult"
fieldList:
type: array
items:
$ref: "#/components/schemas/TextField"
availableSourceList:
type: array
items:
$ref: "#/components/schemas/TextAvailableSource"
TextField:
type: object
required:
- fieldType
- fieldName
- status
- validityStatus
- comparisonStatus
- value
- valueList
- validityList
- comparisonList
properties:
fieldType:
$ref: "./e-text-field-type.yml#/components/schemas/TextFieldType"
fieldName:
description: "Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup."
type: string
lcid:
$ref: "./e-lcid.yml#/components/schemas/LCID"
status:
description: "Overall status of all checks from all values"
$ref: "./common.yml#/components/schemas/CheckResult"
validityStatus:
description: "Overall status of validity from all values"
$ref: "./common.yml#/components/schemas/CheckResult"
comparisonStatus:
description: "Overall status of data comparison from different sources"
$ref: "./common.yml#/components/schemas/CheckResult"
value:
description: "The most confidence value, selected from valueList"
type: string
valueList:
type: array
items:
$ref: "#/components/schemas/TextFieldValue"
validityList:
description: "Validity of all field values for given source.
If there are two values on different pages for one field-source pair,
then validity also will include logical match checking.
If such values do not match, validity will return error."
type: array
items:
$ref: "#/components/schemas/SourceValidity"
comparisonList:
type: array
items:
$ref: "#/components/schemas/CrossSourceValueComparison"
# todo originalValidity очн путает, может в validityList сделать validityList = originalValidity && validityList
TextFieldValue:
type: object
required:
- value
- pageIndex
- source
properties:
source:
$ref: "./common.yml#/components/schemas/Source"
value:
description: "Parsed/processed value. Date format converted for output, delimiters removed"
type: string
originalValue:
description: "Original value as seen in the document"
type: string
originalSymbols:
type: array
items:
$ref: "#/components/schemas/OriginalSymbol"
pageIndex:
$ref: "./common.yml#/components/schemas/PageIndex"
probability:
description: "Min recognition probability. Combined minimum probability from single characters probabilities"
type: integer
minimum: 0
maximum: 100
fieldRect:
description: "Only for visual and mrz results. Coordinates of the rectangle region on a document image(result type 1). Represented by two points - (left, top) + (right, bottom)"
$ref: "./common.yml#/components/schemas/RectangleCoordinates"
rfidOrigin:
description: "Only for rfid images. Text location in rfid chip."
$ref: "./common.yml#/components/schemas/RfidOrigin"
OriginalSymbol:
type: object
properties:
code:
description: "Unicode symbol code"
type: integer
format: int64
probability:
description: "Probability of correctness reading of a single character"
type: integer
minimum: 0
maximum: 100
rect:
$ref: "./common.yml#/components/schemas/RectangleCoordinates"
SourceValidity:
type: object
required:
- source
- status
properties:
source:
$ref: "./common.yml#/components/schemas/Source"
status:
$ref: "./common.yml#/components/schemas/CheckResult"
CrossSourceValueComparison:
type: object
required:
- sourceLeft
- sourceRight
- status
properties:
sourceLeft:
$ref: "./common.yml#/components/schemas/Source"
sourceRight:
$ref: "./common.yml#/components/schemas/Source"
status:
$ref: "./common.yml#/components/schemas/CheckResult"
TextAvailableSource:
type: object
required:
- source
- validityStatus
properties:
source:
$ref: "./common.yml#/components/schemas/Source"
validityStatus:
description: "Overall status of validity from all fields for given source"
$ref: "./common.yml#/components/schemas/CheckResult"
containerType:
$ref: "./rt.yml#/components/schemas/ContainerType"