Skip to content

Commit 687e8f2

Browse files
committed
fix elements field
1 parent bbbbba4 commit 687e8f2

File tree

1 file changed

+186
-192
lines changed

1 file changed

+186
-192
lines changed

articles/cognitive-services/form-recognizer/quickstarts/python-labeled-data.md

Lines changed: 186 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ headers = {
216216
'Ocp-Apim-Subscription-Key': '<subsription key>',
217217
}
218218

219-
body = {
219+
body = {
220220
"source": source,
221221
"sourceFilter": {
222222
"prefix": prefix,
@@ -347,202 +347,196 @@ When the process is completed, you'll receive a `202 (Success)` response with JS
347347

348348
```json
349349
{
350-
"analyzeResult":{
351-
"version":"2.0.0",
352-
"readResults":[
353-
{
354-
"page":1,
355-
"language":"en",
356-
"angle":0,
357-
"width":8.5,
358-
"height":11,
359-
"unit":"inch",
360-
"lines":[
361-
{
362-
"language":"en",
363-
"boundingBox":[
364-
0.5375,
365-
1.1349,
366-
2.6064,
367-
1.1349,
368-
2.6064,
369-
1.354,
370-
0.5375,
371-
1.354
372-
],
373-
"text":"Contoso Suites",
374-
"words":[
375-
{
376-
"boundingBox":[
377-
0.5375,
378-
1.1402,
379-
1.6595,
380-
1.1402,
381-
1.6595,
382-
1.354,
383-
0.5375,
384-
1.354
385-
],
386-
"text":"Contoso",
387-
"confidence":1
388-
},
389-
{
390-
"boundingBox":[
391-
1.758,
392-
1.1349,
393-
2.6064,
394-
1.1349,
395-
2.6064,
396-
1.3534,
397-
1.758,
398-
1.3534
399-
],
400-
"text":"Suites",
401-
"confidence":1
402-
}
403-
]
350+
"analyzeResult":{
351+
"version":"2.0.0",
352+
"readResults":[
353+
{
354+
"page":1,
355+
"language":"en",
356+
"angle":0,
357+
"width":8.5,
358+
"height":11,
359+
"unit":"inch",
360+
"lines":[
361+
{
362+
"language":"en",
363+
"boundingBox":[
364+
0.5375,
365+
1.1349,
366+
2.6064,
367+
1.1349,
368+
2.6064,
369+
1.354,
370+
0.5375,
371+
1.354
372+
],
373+
"text":"Contoso Suites",
374+
"words":[
375+
{
376+
"boundingBox":[
377+
0.5375,
378+
1.1402,
379+
1.6595,
380+
1.1402,
381+
1.6595,
382+
1.354,
383+
0.5375,
384+
1.354
385+
],
386+
"text":"Contoso",
387+
"confidence":1
388+
},
389+
{
390+
"boundingBox":[
391+
1.758,
392+
1.1349,
393+
2.6064,
394+
1.1349,
395+
2.6064,
396+
1.3534,
397+
1.758,
398+
1.3534
399+
],
400+
"text":"Suites",
401+
"confidence":1
402+
}
403+
]
404404
},
405405
...
406-
]
407-
}
408-
],
409-
"pageResults":[
410-
{
411-
"page":1,
412-
"tables":[
413-
{
414-
"rows":2,
415-
"columns":6,
416-
"cells":[
417-
{
418-
"rowIndex":0,
419-
"columnIndex":0,
420-
"text":"Invoice Number",
421-
"boundingBox":[
422-
0.5075,
423-
2.8088,
424-
1.9061,
425-
2.8088,
426-
1.9061,
427-
3.3219,
428-
0.5075,
429-
3.3219
430-
],
431-
"elements":[
432-
"#/readResults/0/lines/7/words/0",
433-
"#/readResults/0/lines/7/words/1"
434-
]
435-
},
436-
{
437-
"rowIndex":0,
438-
"columnIndex":1,
439-
"text":"Invoice Date",
440-
"boundingBox":[
441-
1.9061,
442-
2.8088,
443-
3.3074,
444-
2.8088,
445-
3.3074,
446-
3.3219,
447-
1.9061,
448-
3.3219
449-
],
450-
"elements":[
451-
"#/readResults/0/lines/8/words/0",
452-
"#/readResults/0/lines/8/words/1"
453-
]
406+
]
407+
}
408+
],
409+
"pageResults":[
410+
{
411+
"page":1,
412+
"tables":[
413+
{
414+
"rows":2,
415+
"columns":6,
416+
"cells":[
417+
{
418+
"rowIndex":0,
419+
"columnIndex":0,
420+
"text":"Invoice Number",
421+
"boundingBox":[
422+
0.5075,
423+
2.8088,
424+
1.9061,
425+
2.8088,
426+
1.9061,
427+
3.3219,
428+
0.5075,
429+
3.3219
430+
],
431+
"elements":[
432+
"#/readResults/0/lines/7/words/0",
433+
"#/readResults/0/lines/7/words/1"
434+
]
435+
},
436+
{
437+
"rowIndex":0,
438+
"columnIndex":1,
439+
"text":"Invoice Date",
440+
"boundingBox":[
441+
1.9061,
442+
2.8088,
443+
3.3074,
444+
2.8088,
445+
3.3074,
446+
3.3219,
447+
1.9061,
448+
3.3219
449+
],
450+
"elements":[
451+
"#/readResults/0/lines/8/words/0",
452+
"#/readResults/0/lines/8/words/1"
453+
]
454454
},
455-
...
456-
]
457-
}
458-
]
459-
}
460-
],
461-
"documentResults":[
462-
{
463-
"docType":"Analyze",
464-
"pageRange":[
465-
1,
466-
1
467-
],
468-
"fields":{
469-
"total":{
470-
"type":"string",
471-
"valueString":"$22,123.24",
472-
"text":"$22,123.24",
473-
"boundingBox":[
474-
5.29,
475-
3.41,
476-
5.9750000000000009,
477-
3.41,
478-
5.9750000000000009,
479-
3.54,
480-
5.29,
481-
3.54
482-
],
483-
"page":1,
484-
"confidence":1,
485-
"elements":[
486-
{
487-
"$ref":"#/analyzeResult/readResults/0/lines/15/words/0"
488-
}
489-
],
490-
"fieldName":"total"
491-
},
492-
"invoice #":{
493-
"type":"string",
494-
"valueString":"7689302",
495-
"text":"7689302",
496-
"boundingBox":[
497-
0.54,
498-
3.41,
499-
1.065,
500-
3.41,
501-
1.065,
502-
3.515,
503-
0.54,
504-
3.515
505-
],
506-
"page":1,
507-
"confidence":1,
508-
"elements":[
509-
{
510-
"$ref":"#/analyzeResult/readResults/0/lines/12/words/0"
511-
}
512-
],
513-
"fieldName":"invoice #"
514-
},
515-
"vat":{
516-
"type":"string",
517-
"valueString":"QR",
518-
"text":"QR",
519-
"boundingBox":[
520-
6.2250000000000009,
521-
3.41,
522-
6.425,
523-
3.41,
524-
6.425,
525-
3.52,
526-
6.2250000000000009,
527-
3.52
528-
],
529-
"page":1,
530-
"confidence":0.9839357733726502,
531-
"elements":[
532-
{
533-
"$ref":"#/analyzeResult/readResults/0/lines/16/words/0"
534-
}
535-
],
536-
"fieldName":"vat"
455+
...
456+
]
457+
}
458+
]
459+
}
460+
],
461+
"documentResults":[
462+
{
463+
"docType":"Analyze",
464+
"pageRange":[
465+
1,
466+
1
467+
],
468+
"fields":{
469+
"total":{
470+
"type":"string",
471+
"valueString":"$22,123.24",
472+
"text":"$22,123.24",
473+
"boundingBox":[
474+
5.29,
475+
3.41,
476+
5.9750000000000009,
477+
3.41,
478+
5.9750000000000009,
479+
3.54,
480+
5.29,
481+
3.54
482+
],
483+
"page":1,
484+
"confidence":1,
485+
"elements":[
486+
"#/analyzeResult/readResults/0/lines/15/words/0"
487+
],
488+
"fieldName":"total"
489+
},
490+
"invoice #":{
491+
"type":"string",
492+
"valueString":"7689302",
493+
"text":"7689302",
494+
"boundingBox":[
495+
0.54,
496+
3.41,
497+
1.065,
498+
3.41,
499+
1.065,
500+
3.515,
501+
0.54,
502+
3.515
503+
],
504+
"page":1,
505+
"confidence":1,
506+
"elements":[
507+
"#/analyzeResult/readResults/0/lines/12/words/0"
508+
],
509+
"fieldName":"invoice #"
510+
},
511+
"vat":{
512+
"type":"string",
513+
"valueString":"QR",
514+
"text":"QR",
515+
"boundingBox":[
516+
6.2250000000000009,
517+
3.41,
518+
6.425,
519+
3.41,
520+
6.425,
521+
3.52,
522+
6.2250000000000009,
523+
3.52
524+
],
525+
"page":1,
526+
"confidence":0.9839357733726502,
527+
"elements":[
528+
"#/analyzeResult/readResults/0/lines/16/words/0"
529+
],
530+
"fieldName":"vat"
537531
},
538532
...
539-
}
540-
}
541-
]
542-
},
543-
"status":"succeeded",
544-
"createdDateTime":"2019-11-12T21:26:19+00:00",
545-
"lastUpdatedDateTime":"2019-11-12T21:27:27.0488571+00:00"
533+
}
534+
}
535+
]
536+
},
537+
"status":"succeeded",
538+
"createdDateTime":"2019-11-12T21:26:19+00:00",
539+
"lastUpdatedDateTime":"2019-11-12T21:27:27.0488571+00:00"
546540
}
547541
```
548542

0 commit comments

Comments
 (0)