@aws-amplify/predictions 5.5.6-api-v6-models.b3abc9b.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +3 -0
  2. package/lib/Predictions.d.ts +11 -45
  3. package/lib/Predictions.js +24 -132
  4. package/lib/errors/PredictionsError.d.ts +4 -0
  5. package/lib/errors/PredictionsError.js +15 -0
  6. package/lib/errors/types/validation.d.ts +14 -0
  7. package/lib/errors/types/validation.js +50 -0
  8. package/lib/errors/utils/assertValidationError.d.ts +2 -0
  9. package/lib/errors/utils/assertValidationError.js +14 -0
  10. package/lib/index.d.ts +2 -4
  11. package/lib/index.js +2 -9
  12. package/{lib-esm/Providers → lib/providers}/AmazonAIConvertPredictionsProvider.d.ts +6 -7
  13. package/lib/providers/AmazonAIConvertPredictionsProvider.js +307 -0
  14. package/lib/{Providers → providers}/AmazonAIIdentifyPredictionsProvider.d.ts +5 -6
  15. package/lib/providers/AmazonAIIdentifyPredictionsProvider.js +334 -0
  16. package/lib/{Providers → providers}/AmazonAIInterpretPredictionsProvider.d.ts +3 -4
  17. package/lib/providers/AmazonAIInterpretPredictionsProvider.js +208 -0
  18. package/lib/providers/IdentifyTextUtils.d.ts +16 -0
  19. package/lib/{Providers → providers}/IdentifyTextUtils.js +97 -148
  20. package/lib/{Providers → providers}/Utils.d.ts +2 -2
  21. package/lib/{Providers → providers}/Utils.js +11 -12
  22. package/lib/{Providers → providers}/index.d.ts +1 -2
  23. package/lib/providers/index.js +11 -0
  24. package/lib/tsconfig.tsbuildinfo +1 -0
  25. package/lib/types/AWSTypes.d.ts +8 -9
  26. package/lib/types/AWSTypes.js +0 -1
  27. package/lib/types/Predictions.d.ts +63 -59
  28. package/lib/types/Predictions.js +41 -28
  29. package/lib/types/index.js +1 -2
  30. package/lib-esm/Predictions.d.ts +11 -45
  31. package/lib-esm/Predictions.js +23 -133
  32. package/lib-esm/errors/PredictionsError.d.ts +4 -0
  33. package/lib-esm/errors/PredictionsError.js +11 -0
  34. package/lib-esm/errors/types/validation.d.ts +14 -0
  35. package/lib-esm/errors/types/validation.js +47 -0
  36. package/lib-esm/errors/utils/assertValidationError.d.ts +2 -0
  37. package/lib-esm/errors/utils/assertValidationError.js +10 -0
  38. package/lib-esm/index.d.ts +2 -4
  39. package/lib-esm/index.js +1 -5
  40. package/{lib/Providers → lib-esm/providers}/AmazonAIConvertPredictionsProvider.d.ts +6 -7
  41. package/lib-esm/providers/AmazonAIConvertPredictionsProvider.js +303 -0
  42. package/lib-esm/{Providers → providers}/AmazonAIIdentifyPredictionsProvider.d.ts +5 -6
  43. package/lib-esm/providers/AmazonAIIdentifyPredictionsProvider.js +330 -0
  44. package/lib-esm/{Providers → providers}/AmazonAIInterpretPredictionsProvider.d.ts +3 -4
  45. package/lib-esm/providers/AmazonAIInterpretPredictionsProvider.js +204 -0
  46. package/lib-esm/providers/IdentifyTextUtils.d.ts +16 -0
  47. package/lib-esm/providers/IdentifyTextUtils.js +264 -0
  48. package/lib-esm/{Providers → providers}/Utils.d.ts +2 -2
  49. package/lib-esm/{Providers → providers}/Utils.js +10 -12
  50. package/lib-esm/{Providers → providers}/index.d.ts +1 -2
  51. package/lib-esm/{Providers → providers}/index.js +1 -3
  52. package/lib-esm/tsconfig.tsbuildinfo +1 -0
  53. package/lib-esm/types/AWSTypes.d.ts +8 -9
  54. package/lib-esm/types/AWSTypes.js +1 -1
  55. package/lib-esm/types/Predictions.d.ts +63 -59
  56. package/lib-esm/types/Predictions.js +34 -27
  57. package/lib-esm/types/index.js +0 -1
  58. package/package.json +39 -48
  59. package/src/Predictions.ts +33 -220
  60. package/src/errors/PredictionsError.ts +16 -0
  61. package/src/errors/types/validation.ts +51 -0
  62. package/src/errors/utils/assertValidationError.ts +18 -0
  63. package/src/index.ts +16 -16
  64. package/src/{Providers → providers}/AmazonAIConvertPredictionsProvider.ts +210 -171
  65. package/src/{Providers → providers}/AmazonAIIdentifyPredictionsProvider.ts +244 -246
  66. package/src/providers/AmazonAIInterpretPredictionsProvider.ts +293 -0
  67. package/src/{Providers → providers}/IdentifyTextUtils.ts +69 -52
  68. package/src/{Providers → providers}/Utils.ts +2 -2
  69. package/src/{Providers → providers}/index.ts +0 -2
  70. package/src/types/AWSTypes.ts +5 -6
  71. package/src/types/Predictions.ts +107 -62
  72. package/lib/.tsbuildinfo +0 -3
  73. package/lib/Predictions.js.map +0 -1
  74. package/lib/Providers/AmazonAIConvertPredictionsProvider.js +0 -377
  75. package/lib/Providers/AmazonAIConvertPredictionsProvider.js.map +0 -1
  76. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js +0 -441
  77. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js.map +0 -1
  78. package/lib/Providers/AmazonAIInterpretPredictionsProvider.js +0 -321
  79. package/lib/Providers/AmazonAIInterpretPredictionsProvider.js.map +0 -1
  80. package/lib/Providers/AmazonAIPredictionsProvider.d.ts +0 -14
  81. package/lib/Providers/AmazonAIPredictionsProvider.js +0 -43
  82. package/lib/Providers/AmazonAIPredictionsProvider.js.map +0 -1
  83. package/lib/Providers/IdentifyTextUtils.d.ts +0 -40
  84. package/lib/Providers/IdentifyTextUtils.js.map +0 -1
  85. package/lib/Providers/Utils.js.map +0 -1
  86. package/lib/Providers/index.js +0 -13
  87. package/lib/Providers/index.js.map +0 -1
  88. package/lib/index.js.map +0 -1
  89. package/lib/types/AWSTypes.js.map +0 -1
  90. package/lib/types/Predictions.js.map +0 -1
  91. package/lib/types/Providers/AbstractConvertPredictionsProvider.d.ts +0 -9
  92. package/lib/types/Providers/AbstractConvertPredictionsProvider.js +0 -44
  93. package/lib/types/Providers/AbstractConvertPredictionsProvider.js.map +0 -1
  94. package/lib/types/Providers/AbstractIdentifyPredictionsProvider.d.ts +0 -9
  95. package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js +0 -44
  96. package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js.map +0 -1
  97. package/lib/types/Providers/AbstractInterpretPredictionsProvider.d.ts +0 -7
  98. package/lib/types/Providers/AbstractInterpretPredictionsProvider.js +0 -27
  99. package/lib/types/Providers/AbstractInterpretPredictionsProvider.js.map +0 -1
  100. package/lib/types/Providers/AbstractPredictionsProvider.d.ts +0 -7
  101. package/lib/types/Providers/AbstractPredictionsProvider.js +0 -16
  102. package/lib/types/Providers/AbstractPredictionsProvider.js.map +0 -1
  103. package/lib/types/Providers/index.d.ts +0 -4
  104. package/lib/types/Providers/index.js +0 -10
  105. package/lib/types/Providers/index.js.map +0 -1
  106. package/lib/types/index.js.map +0 -1
  107. package/lib-esm/.tsbuildinfo +0 -3
  108. package/lib-esm/Predictions.js.map +0 -1
  109. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js +0 -375
  110. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js.map +0 -1
  111. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js +0 -439
  112. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js.map +0 -1
  113. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js +0 -319
  114. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js.map +0 -1
  115. package/lib-esm/Providers/AmazonAIPredictionsProvider.d.ts +0 -14
  116. package/lib-esm/Providers/AmazonAIPredictionsProvider.js +0 -41
  117. package/lib-esm/Providers/AmazonAIPredictionsProvider.js.map +0 -1
  118. package/lib-esm/Providers/IdentifyTextUtils.d.ts +0 -40
  119. package/lib-esm/Providers/IdentifyTextUtils.js +0 -313
  120. package/lib-esm/Providers/IdentifyTextUtils.js.map +0 -1
  121. package/lib-esm/Providers/Utils.js.map +0 -1
  122. package/lib-esm/Providers/index.js.map +0 -1
  123. package/lib-esm/index.js.map +0 -1
  124. package/lib-esm/types/AWSTypes.js.map +0 -1
  125. package/lib-esm/types/Predictions.js.map +0 -1
  126. package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.d.ts +0 -9
  127. package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js +0 -42
  128. package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js.map +0 -1
  129. package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.d.ts +0 -9
  130. package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js +0 -42
  131. package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js.map +0 -1
  132. package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.d.ts +0 -7
  133. package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js +0 -25
  134. package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js.map +0 -1
  135. package/lib-esm/types/Providers/AbstractPredictionsProvider.d.ts +0 -7
  136. package/lib-esm/types/Providers/AbstractPredictionsProvider.js +0 -14
  137. package/lib-esm/types/Providers/AbstractPredictionsProvider.js.map +0 -1
  138. package/lib-esm/types/Providers/index.d.ts +0 -4
  139. package/lib-esm/types/Providers/index.js +0 -7
  140. package/lib-esm/types/Providers/index.js.map +0 -1
  141. package/lib-esm/types/index.js.map +0 -1
  142. package/src/Providers/AmazonAIInterpretPredictionsProvider.ts +0 -281
  143. package/src/Providers/AmazonAIPredictionsProvider.ts +0 -69
  144. package/src/types/Providers/AbstractConvertPredictionsProvider.ts +0 -55
  145. package/src/types/Providers/AbstractIdentifyPredictionsProvider.ts +0 -57
  146. package/src/types/Providers/AbstractInterpretPredictionsProvider.ts +0 -26
  147. package/src/types/Providers/AbstractPredictionsProvider.ts +0 -20
  148. package/src/types/Providers/index.ts +0 -6
@@ -1,313 +0,0 @@
1
- import { __values } from "tslib";
2
- import { makeCamelCaseArray, makeCamelCase } from './Utils';
3
- function getBoundingBox(geometry) {
4
- if (!geometry)
5
- return undefined;
6
- return makeCamelCase(geometry.BoundingBox);
7
- }
8
- function getPolygon(geometry) {
9
- if (!geometry)
10
- return undefined;
11
- return makeCamelCaseArray(Array.from(geometry.Polygon));
12
- }
13
- /**
14
- * Organizes blocks from Rekognition API to each of the categories and and structures
15
- * their data accordingly.
16
- * @param {BlockList} source - Array containing blocks returned from Textract API.
17
- * @return {IdentifyTextOutput} - Object that categorizes each block and its information.
18
- */
19
- export function categorizeRekognitionBlocks(blocks) {
20
- // Skeleton IdentifyText API response. We will populate it as we iterate through blocks.
21
- var response = {
22
- text: {
23
- fullText: '',
24
- words: [],
25
- lines: [],
26
- linesDetailed: [],
27
- },
28
- };
29
- // We categorize each block by running a forEach loop through them.
30
- blocks.forEach(function (block) {
31
- switch (block.Type) {
32
- case 'LINE':
33
- response.text.lines.push(block.DetectedText);
34
- response.text.linesDetailed.push({
35
- text: block.DetectedText,
36
- polygon: getPolygon(block.Geometry),
37
- boundingBox: getBoundingBox(block.Geometry),
38
- page: null,
39
- });
40
- break;
41
- case 'WORD':
42
- response.text.fullText += block.DetectedText + ' ';
43
- response.text.words.push({
44
- text: block.DetectedText,
45
- polygon: getPolygon(block.Geometry),
46
- boundingBox: getBoundingBox(block.Geometry),
47
- });
48
- break;
49
- }
50
- });
51
- // remove trailing space of fullText
52
- response.text.fullText = response.text.fullText.substr(0, response.text.fullText.length - 1);
53
- return response;
54
- }
55
- /**
56
- * Organizes blocks from Textract API to each of the categories and and structures
57
- * their data accordingly.
58
- * @param {BlockList} source - Array containing blocks returned from Textract API.
59
- * @return {IdentifyTextOutput} - Object that categorizes each block and its information.
60
- */
61
- export function categorizeTextractBlocks(blocks) {
62
- // Skeleton IdentifyText API response. We will populate it as we iterate through blocks.
63
- var response = {
64
- text: {
65
- fullText: '',
66
- words: [],
67
- lines: [],
68
- linesDetailed: [],
69
- },
70
- };
71
- // if blocks is an empty array, ie. textract did not detect anything, return empty response.
72
- if (blocks.length === 0)
73
- return response;
74
- /**
75
- * We categorize each of the blocks by running a forEach loop through them.
76
- *
77
- * For complex structures such as Tables and KeyValue, we need to trasverse through their children. To do so,
78
- * we will post-process them after the for each loop. We do this by storing table and keyvalues in arrays and
79
- * mapping other blocks in `blockMap` (id to block) so we can reference them easily later.
80
- *
81
- * Note that we do not map `WORD` and `TABLE` in `blockMap` because they will not be referenced by any other
82
- * block except the Page block.
83
- */
84
- var tableBlocks = Array();
85
- var keyValueBlocks = Array();
86
- var blockMap = {};
87
- blocks.forEach(function (block) {
88
- switch (block.BlockType) {
89
- case 'LINE':
90
- response.text.lines.push(block.Text);
91
- response.text.linesDetailed.push({
92
- text: block.Text,
93
- polygon: getPolygon(block.Geometry),
94
- boundingBox: getBoundingBox(block.Geometry),
95
- page: block.Page,
96
- });
97
- break;
98
- case 'WORD':
99
- response.text.fullText += block.Text + ' ';
100
- response.text.words.push({
101
- text: block.Text,
102
- polygon: getPolygon(block.Geometry),
103
- boundingBox: getBoundingBox(block.Geometry),
104
- });
105
- blockMap[block.Id] = block;
106
- break;
107
- case 'SELECTION_ELEMENT':
108
- var selectionStatus = block.SelectionStatus === 'SELECTED' ? true : false;
109
- if (!response.text.selections)
110
- response.text.selections = [];
111
- response.text.selections.push({
112
- selected: selectionStatus,
113
- polygon: getPolygon(block.Geometry),
114
- boundingBox: getBoundingBox(block.Geometry),
115
- });
116
- blockMap[block.Id] = block;
117
- break;
118
- case 'TABLE':
119
- tableBlocks.push(block);
120
- break;
121
- case 'KEY_VALUE_SET':
122
- keyValueBlocks.push(block);
123
- blockMap[block.Id] = block;
124
- break;
125
- default:
126
- blockMap[block.Id] = block;
127
- }
128
- });
129
- // remove trailing space in fullText
130
- response.text.fullText = response.text.fullText.substr(0, response.text.fullText.length - 1);
131
- // Post-process complex structures if they exist.
132
- if (tableBlocks.length !== 0) {
133
- var tableResponse_1 = Array();
134
- tableBlocks.forEach(function (table) {
135
- tableResponse_1.push(constructTable(table, blockMap));
136
- });
137
- response.text.tables = tableResponse_1;
138
- }
139
- if (keyValueBlocks.length !== 0) {
140
- var keyValueResponse_1 = Array();
141
- keyValueBlocks.forEach(function (keyValue) {
142
- // We need the KeyValue blocks of EntityType = `KEY`, which has both key and value references.
143
- var entityTypes = Array.from(keyValue.EntityTypes);
144
- if (entityTypes.indexOf('KEY') !== -1) {
145
- keyValueResponse_1.push(constructKeyValue(keyValue, blockMap));
146
- }
147
- });
148
- response.text.keyValues = keyValueResponse_1;
149
- }
150
- return response;
151
- }
152
- /**
153
- * Constructs a table object using data from its children cells.
154
- * @param {Block} table - Table block that has references (`Relationships`) to its cells
155
- * @param {[id: string]: Block} blockMap - Maps block Ids to blocks.
156
- */
157
- export function constructTable(table, blockMap) {
158
- var e_1, _a, e_2, _b;
159
- var tableMatrix;
160
- tableMatrix = [];
161
- try {
162
- // visit each of the cell associated with the table's relationship.
163
- for (var _c = __values(table.Relationships), _d = _c.next(); !_d.done; _d = _c.next()) {
164
- var tableRelation = _d.value;
165
- try {
166
- for (var _e = (e_2 = void 0, __values(tableRelation.Ids)), _f = _e.next(); !_f.done; _f = _e.next()) {
167
- var cellId = _f.value;
168
- var cellBlock = blockMap[cellId];
169
- var row = cellBlock.RowIndex - 1; // textract starts indexing at 1, so subtract it by 1.
170
- var col = cellBlock.ColumnIndex - 1; // textract starts indexing at 1, so subtract it by 1.
171
- // extract data contained inside the cell.
172
- var content = extractContentsFromBlock(cellBlock, blockMap);
173
- var cell = {
174
- text: content.text,
175
- boundingBox: getBoundingBox(cellBlock.Geometry),
176
- polygon: getPolygon(cellBlock.Geometry),
177
- selected: content.selected,
178
- rowSpan: cellBlock.RowSpan,
179
- columnSpan: cellBlock.ColumnSpan,
180
- };
181
- if (!tableMatrix[row])
182
- tableMatrix[row] = [];
183
- tableMatrix[row][col] = cell;
184
- }
185
- }
186
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
187
- finally {
188
- try {
189
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
190
- }
191
- finally { if (e_2) throw e_2.error; }
192
- }
193
- }
194
- }
195
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
196
- finally {
197
- try {
198
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
199
- }
200
- finally { if (e_1) throw e_1.error; }
201
- }
202
- var rowSize = tableMatrix.length;
203
- var columnSize = tableMatrix[0].length;
204
- // Note that we leave spanned cells undefined for distinction
205
- return {
206
- size: { rows: rowSize, columns: columnSize },
207
- table: tableMatrix,
208
- boundingBox: getBoundingBox(table.Geometry),
209
- polygon: getPolygon(table.Geometry),
210
- };
211
- }
212
- /**
213
- * Constructs a key value object from its children key and value blocks.
214
- * @param {Block} KeyValue - KeyValue block that has references (`Relationships`) to its children.
215
- * @param {[id: string]: Block} blockMap - Maps block Ids to blocks.
216
- */
217
- export function constructKeyValue(keyBlock, blockMap) {
218
- var e_3, _a, e_4, _b;
219
- var keyText = '';
220
- var valueText = '';
221
- var valueSelected;
222
- try {
223
- for (var _c = __values(keyBlock.Relationships), _d = _c.next(); !_d.done; _d = _c.next()) {
224
- var keyValueRelation = _d.value;
225
- if (keyValueRelation.Type === 'CHILD') {
226
- // relation refers to key
227
- var contents = extractContentsFromBlock(keyBlock, blockMap);
228
- keyText = contents.text;
229
- }
230
- else if (keyValueRelation.Type === 'VALUE') {
231
- try {
232
- // relation refers to value
233
- for (var _e = (e_4 = void 0, __values(keyValueRelation.Ids)), _f = _e.next(); !_f.done; _f = _e.next()) {
234
- var valueId = _f.value;
235
- var valueBlock = blockMap[valueId];
236
- var contents = extractContentsFromBlock(valueBlock, blockMap);
237
- valueText = contents.text;
238
- if (contents.selected != null)
239
- valueSelected = contents.selected;
240
- }
241
- }
242
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
243
- finally {
244
- try {
245
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
246
- }
247
- finally { if (e_4) throw e_4.error; }
248
- }
249
- }
250
- }
251
- }
252
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
253
- finally {
254
- try {
255
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
256
- }
257
- finally { if (e_3) throw e_3.error; }
258
- }
259
- return {
260
- key: keyText,
261
- value: { text: valueText, selected: valueSelected },
262
- polygon: getPolygon(keyBlock.Geometry),
263
- boundingBox: getBoundingBox(keyBlock.Geometry),
264
- };
265
- }
266
- /**
267
- * Extracts text and selection from input block's children.
268
- * @param {Block}} block - Block that we want to extract contents from.
269
- * @param {[id: string]: Block} blockMap - Maps block Ids to blocks.
270
- */
271
- export function extractContentsFromBlock(block, blockMap) {
272
- var e_5, _a, e_6, _b;
273
- var words = '';
274
- var isSelected;
275
- if (!block.Relationships) {
276
- // some block might have no content
277
- return { text: '', selected: undefined };
278
- }
279
- try {
280
- for (var _c = __values(block.Relationships), _d = _c.next(); !_d.done; _d = _c.next()) {
281
- var relation = _d.value;
282
- try {
283
- for (var _e = (e_6 = void 0, __values(relation.Ids)), _f = _e.next(); !_f.done; _f = _e.next()) {
284
- var contentId = _f.value;
285
- var contentBlock = blockMap[contentId];
286
- if (contentBlock.BlockType === 'WORD') {
287
- words += contentBlock.Text + ' ';
288
- }
289
- else if (contentBlock.BlockType === 'SELECTION_ELEMENT') {
290
- isSelected = contentBlock.SelectionStatus === 'SELECTED' ? true : false;
291
- }
292
- }
293
- }
294
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
295
- finally {
296
- try {
297
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
298
- }
299
- finally { if (e_6) throw e_6.error; }
300
- }
301
- }
302
- }
303
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
304
- finally {
305
- try {
306
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
307
- }
308
- finally { if (e_5) throw e_5.error; }
309
- }
310
- words = words.substr(0, words.length - 1); // remove trailing space.
311
- return { text: words, selected: isSelected };
312
- }
313
- //# sourceMappingURL=IdentifyTextUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IdentifyTextUtils.js","sourceRoot":"","sources":["../../src/Providers/IdentifyTextUtils.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,SAAS,cAAc,CAAC,QAAkB;IACzC,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,OAA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C;SAC/B;QAAC,OAAO,GAAG,EAAE;YACb,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,kCAAkC;SAC5C;IACF,CAAC,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Providers/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EACN,kCAAkC,EAClC,mCAAmC,EACnC,oCAAoC,EACpC,2BAA2B,GAC3B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACN,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,oCAAoC,GACpC,MAAM,aAAa,CAAC;AAErB,cAAc,SAAS,CAAC;AAExB,OAAO,EACN,WAAW,EACX,mCAAmC,EACnC,kCAAkC,EAClC,2BAA2B,EAC3B,oCAAoC,GACpC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AWSTypes.js","sourceRoot":"","sources":["../../src/types/AWSTypes.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Predictions.js","sourceRoot":"","sources":["../../src/types/Predictions.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,oCAAoC;AAapC;;GAEG;AAEH,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IAClC,sCAAW,CAAA;IACX,gDAAqB,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AC;IACrC,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAQ;IACrC,IAAM,GAAG,GAAsB,OAAO,CAAC;IACvC,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IAC3C,IAAM,GAAG,GAA4B,MAAM,CAAC;IAC5C,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,GAAQ;IAC7C,IAAM,GAAG,GAA8B,QAAQ,CAAC;IAChD,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,uBAAuB,CACtC,GAAQ;IAER,IAAM,GAAG,GAAgC,UAAU,CAAC;IACpD,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,GAAQ;IAC5C,IAAM,GAAG,GAA6B,MAAM,CAAC;IAC7C,OAAO,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC"}
@@ -1,9 +0,0 @@
1
- import { TranslateTextInput, TextToSpeechInput, SpeechToTextInput, TranslateTextOutput, TextToSpeechOutput, SpeechToTextOutput } from '../Predictions';
2
- import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
3
- export declare abstract class AbstractConvertPredictionsProvider extends AbstractPredictionsProvider {
4
- getCategory(): string;
5
- convert(input: TranslateTextInput | TextToSpeechInput | SpeechToTextInput): Promise<TextToSpeechOutput | TranslateTextOutput | SpeechToTextOutput>;
6
- protected translateText(translateTextInput: TranslateTextInput): Promise<TranslateTextOutput>;
7
- protected convertTextToSpeech(textToSpeechInput: TextToSpeechInput): Promise<TextToSpeechOutput>;
8
- protected convertSpeechToText(speechToTextInput: SpeechToTextInput): Promise<SpeechToTextOutput>;
9
- }
@@ -1,42 +0,0 @@
1
- import { __extends } from "tslib";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- import { isTranslateTextInput, isTextToSpeechInput, isSpeechToTextInput, } from '../Predictions';
5
- import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
6
- import { ConsoleLogger as Logger } from '@aws-amplify/core';
7
- var logger = new Logger('AbstractConvertPredictionsProvider');
8
- var AbstractConvertPredictionsProvider = /** @class */ (function (_super) {
9
- __extends(AbstractConvertPredictionsProvider, _super);
10
- function AbstractConvertPredictionsProvider() {
11
- return _super !== null && _super.apply(this, arguments) || this;
12
- }
13
- AbstractConvertPredictionsProvider.prototype.getCategory = function () {
14
- return 'Convert';
15
- };
16
- AbstractConvertPredictionsProvider.prototype.convert = function (input) {
17
- if (isTranslateTextInput(input)) {
18
- logger.debug('translateText');
19
- return this.translateText(input);
20
- }
21
- else if (isTextToSpeechInput(input)) {
22
- logger.debug('textToSpeech');
23
- return this.convertTextToSpeech(input);
24
- }
25
- else if (isSpeechToTextInput(input)) {
26
- logger.debug('textToSpeech');
27
- return this.convertSpeechToText(input);
28
- }
29
- };
30
- AbstractConvertPredictionsProvider.prototype.translateText = function (translateTextInput) {
31
- throw new Error('convertText is not implemented by this provider');
32
- };
33
- AbstractConvertPredictionsProvider.prototype.convertTextToSpeech = function (textToSpeechInput) {
34
- throw new Error('convertTextToSpeech is not implemented by this provider');
35
- };
36
- AbstractConvertPredictionsProvider.prototype.convertSpeechToText = function (speechToTextInput) {
37
- throw new Error('convertSpeechToText is not implemented by this provider');
38
- };
39
- return AbstractConvertPredictionsProvider;
40
- }(AbstractPredictionsProvider));
41
- export { AbstractConvertPredictionsProvider };
42
- //# sourceMappingURL=AbstractConvertPredictionsProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AbstractConvertPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractConvertPredictionsProvider.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAIN,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GAInB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,oCAAoC,CAAC,CAAC;AAEhE;IAAiE,sDAA2B;IAA5F;;IAqCA,CAAC;IApCA,wDAAW,GAAX;QACC,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,oDAAO,GAAP,UACC,KAAiE;QAEjE,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAChC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACjC;aAAM,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YACtC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;SACvC;aAAM,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YACtC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;SACvC;IACF,CAAC;IAES,0DAAa,GAAvB,UACC,kBAAsC;QAEtC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACpE,CAAC;IAES,gEAAmB,GAA7B,UACC,iBAAoC;QAEpC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC5E,CAAC;IAES,gEAAmB,GAA7B,UACC,iBAAoC;QAEpC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC5E,CAAC;IACF,yCAAC;AAAD,CAAC,AArCD,CAAiE,2BAA2B,GAqC3F"}
@@ -1,9 +0,0 @@
1
- import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
2
- import { IdentifyLabelsInput, IdentifyEntitiesInput, IdentifyTextInput, IdentifyTextOutput, IdentifyLabelsOutput, IdentifyEntitiesOutput } from '../Predictions';
3
- export declare abstract class AbstractIdentifyPredictionsProvider extends AbstractPredictionsProvider {
4
- getCategory(): string;
5
- identify(input: IdentifyTextInput | IdentifyLabelsInput | IdentifyEntitiesInput): Promise<IdentifyTextOutput | IdentifyLabelsOutput | IdentifyEntitiesOutput>;
6
- protected identifyText(input: IdentifyTextInput): Promise<IdentifyTextOutput>;
7
- protected identifyLabels(input: IdentifyLabelsInput): Promise<IdentifyLabelsOutput>;
8
- protected identifyEntities(input: IdentifyEntitiesInput): Promise<IdentifyEntitiesOutput>;
9
- }
@@ -1,42 +0,0 @@
1
- import { __extends } from "tslib";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
5
- import { isIdentifyLabelsInput, isIdentifyEntitiesInput, isIdentifyTextInput, } from '../Predictions';
6
- import { Logger } from '@aws-amplify/core';
7
- var logger = new Logger('AbstractIdentifyPredictionsProvider');
8
- var AbstractIdentifyPredictionsProvider = /** @class */ (function (_super) {
9
- __extends(AbstractIdentifyPredictionsProvider, _super);
10
- function AbstractIdentifyPredictionsProvider() {
11
- return _super !== null && _super.apply(this, arguments) || this;
12
- }
13
- AbstractIdentifyPredictionsProvider.prototype.getCategory = function () {
14
- return 'Identify';
15
- };
16
- AbstractIdentifyPredictionsProvider.prototype.identify = function (input) {
17
- if (isIdentifyTextInput(input)) {
18
- logger.debug('identifyText');
19
- return this.identifyText(input);
20
- }
21
- else if (isIdentifyLabelsInput(input)) {
22
- logger.debug('identifyLabels');
23
- return this.identifyLabels(input);
24
- }
25
- else if (isIdentifyEntitiesInput(input)) {
26
- logger.debug('identifyEntities');
27
- return this.identifyEntities(input);
28
- }
29
- };
30
- AbstractIdentifyPredictionsProvider.prototype.identifyText = function (input) {
31
- throw new Error('identifyText is not implemented by this provider.');
32
- };
33
- AbstractIdentifyPredictionsProvider.prototype.identifyLabels = function (input) {
34
- throw new Error('identifyLabels is not implemented by this provider');
35
- };
36
- AbstractIdentifyPredictionsProvider.prototype.identifyEntities = function (input) {
37
- throw new Error('identifyEntities is not implemented by this provider');
38
- };
39
- return AbstractIdentifyPredictionsProvider;
40
- }(AbstractPredictionsProvider));
41
- export { AbstractIdentifyPredictionsProvider };
42
- //# sourceMappingURL=AbstractIdentifyPredictionsProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AbstractIdentifyPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractIdentifyPredictionsProvider.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAGN,qBAAqB,EACrB,uBAAuB,EAEvB,mBAAmB,GAInB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,qCAAqC,CAAC,CAAC;AAEjE;IAAkE,uDAA2B;IAA7F;;IAuCA,CAAC;IAtCA,yDAAW,GAAX;QACC,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,sDAAQ,GAAR,UACC,KAAsE;QAItE,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC/B,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;SAChC;aAAM,IAAI,qBAAqB,CAAC,KAAK,CAAC,EAAE;YACxC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SAClC;aAAM,IAAI,uBAAuB,CAAC,KAAK,CAAC,EAAE;YAC1C,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;SACpC;IACF,CAAC;IAES,0DAAY,GAAtB,UACC,KAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IAES,4DAAc,GAAxB,UACC,KAA0B;QAE1B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACvE,CAAC;IAES,8DAAgB,GAA1B,UACC,KAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACzE,CAAC;IACF,0CAAC;AAAD,CAAC,AAvCD,CAAkE,2BAA2B,GAuC5F"}
@@ -1,7 +0,0 @@
1
- import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
2
- import { InterpretTextInput, InterpretTextOutput } from '../Predictions';
3
- export declare abstract class AbstractInterpretPredictionsProvider extends AbstractPredictionsProvider {
4
- getCategory(): string;
5
- interpret(input: InterpretTextInput): Promise<InterpretTextOutput>;
6
- protected interpretText(input: InterpretTextInput): Promise<InterpretTextOutput>;
7
- }
@@ -1,25 +0,0 @@
1
- import { __extends } from "tslib";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
5
- import { isInterpretTextInput, } from '../Predictions';
6
- var AbstractInterpretPredictionsProvider = /** @class */ (function (_super) {
7
- __extends(AbstractInterpretPredictionsProvider, _super);
8
- function AbstractInterpretPredictionsProvider() {
9
- return _super !== null && _super.apply(this, arguments) || this;
10
- }
11
- AbstractInterpretPredictionsProvider.prototype.getCategory = function () {
12
- return 'Interpret';
13
- };
14
- AbstractInterpretPredictionsProvider.prototype.interpret = function (input) {
15
- if (isInterpretTextInput(input)) {
16
- return this.interpretText(input);
17
- }
18
- };
19
- AbstractInterpretPredictionsProvider.prototype.interpretText = function (input) {
20
- throw new Error('interpretText is not implement by this provider');
21
- };
22
- return AbstractInterpretPredictionsProvider;
23
- }(AbstractPredictionsProvider));
24
- export { AbstractInterpretPredictionsProvider };
25
- //# sourceMappingURL=AbstractInterpretPredictionsProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AbstractInterpretPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractInterpretPredictionsProvider.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAGN,oBAAoB,GACpB,MAAM,gBAAgB,CAAC;AAExB;IAAmE,wDAA2B;IAA9F;;IAgBA,CAAC;IAfA,0DAAW,GAAX;QACC,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,wDAAS,GAAT,UAAU,KAAyB;QAClC,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACjC;IACF,CAAC;IAES,4DAAa,GAAvB,UACC,KAAyB;QAEzB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACpE,CAAC;IACF,2CAAC;AAAD,CAAC,AAhBD,CAAmE,2BAA2B,GAgB7F"}
@@ -1,7 +0,0 @@
1
- import { PredictionsOptions } from '..';
2
- export declare abstract class AbstractPredictionsProvider {
3
- protected _config: PredictionsOptions;
4
- configure(config: PredictionsOptions): PredictionsOptions;
5
- abstract getProviderName(): string;
6
- abstract getCategory(): string;
7
- }
@@ -1,14 +0,0 @@
1
- import { ConsoleLogger as Logger } from '@aws-amplify/core';
2
- var logger = new Logger('Amplify');
3
- var AbstractPredictionsProvider = /** @class */ (function () {
4
- function AbstractPredictionsProvider() {
5
- }
6
- AbstractPredictionsProvider.prototype.configure = function (config) {
7
- logger.debug('configure AbstractPredictionsProvider', { config: config });
8
- this._config = config;
9
- return config;
10
- };
11
- return AbstractPredictionsProvider;
12
- }());
13
- export { AbstractPredictionsProvider };
14
- //# sourceMappingURL=AbstractPredictionsProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AbstractPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractPredictionsProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE5D,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;AAErC;IAAA;IAYA,CAAC;IATA,+CAAS,GAAT,UAAU,MAA0B;QACnC,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,OAAO,MAAM,CAAC;IACf,CAAC;IAKF,kCAAC;AAAD,CAAC,AAZD,IAYC"}
@@ -1,4 +0,0 @@
1
- export * from './AbstractPredictionsProvider';
2
- export * from './AbstractConvertPredictionsProvider';
3
- export * from './AbstractIdentifyPredictionsProvider';
4
- export * from './AbstractInterpretPredictionsProvider';
@@ -1,7 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- export * from './AbstractPredictionsProvider';
4
- export * from './AbstractConvertPredictionsProvider';
5
- export * from './AbstractIdentifyPredictionsProvider';
6
- export * from './AbstractInterpretPredictionsProvider';
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/Providers/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,cAAc,eAAe,CAAC"}