@@ -293,36 +293,36 @@ def test_pdf_mal_bbox(client, configured_project_pdf):
293293 assert import_annotations .errors == []
294294
295295
296- def test_pdf_document_entity (client , configured_project_pdf_entity , dataset_pdf_entity ):
296+ def test_pdf_document_entity (client , configured_project_pdf_entity ,
297+ dataset_pdf_entity ):
297298 # for content "Metal-insulator (MI) transitions have been one of the" in OCR JSON extract tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json
298- document_text_selection = DocumentTextSelection (groupId = "2f4336f4-a07e-4e0a-a9e1-5629b03b719b" ,
299- tokenIds = ["3f984bf3-1d61-44f5-b59a-9658a2e3440f" ,
300- "3bf00b56-ff12-4e52-8cc1-08dbddb3c3b8" ,
301- "6e1c3420-d4b7-4c5a-8fd6-ead43bf73d80" ,
302- "87a43d32-af76-4a1d-b262-5c5f4d5ace3a" ,
303- "e8606e8a-dfd9-4c49-a635-ad5c879c75d0" ,
304- "67c7c19e-4654-425d-bf17-2adb8cf02c30" ,
305- "149c5e80-3e07-49a7-ab2d-29ddfe6a38fa" ,
306- "b0e94071-2187-461e-8e76-96c58738a52c" ],
307- page = 1 )
308-
309- entities_annotation_document_entity = DocumentEntity (name = "named_entity" ,
310- textSelections = [document_text_selection ])
311- entities_annotation = ObjectAnnotation (name = "named-entity" ,
312- value = entities_annotation_document_entity )
299+ document_text_selection = DocumentTextSelection (
300+ groupId = "2f4336f4-a07e-4e0a-a9e1-5629b03b719b" ,
301+ tokenIds = [
302+ "3f984bf3-1d61-44f5-b59a-9658a2e3440f" ,
303+ "3bf00b56-ff12-4e52-8cc1-08dbddb3c3b8" ,
304+ "6e1c3420-d4b7-4c5a-8fd6-ead43bf73d80" ,
305+ "87a43d32-af76-4a1d-b262-5c5f4d5ace3a" ,
306+ "e8606e8a-dfd9-4c49-a635-ad5c879c75d0" ,
307+ "67c7c19e-4654-425d-bf17-2adb8cf02c30" ,
308+ "149c5e80-3e07-49a7-ab2d-29ddfe6a38fa" ,
309+ "b0e94071-2187-461e-8e76-96c58738a52c"
310+ ],
311+ page = 1 )
312+
313+ entities_annotation_document_entity = DocumentEntity (
314+ name = "named_entity" , textSelections = [document_text_selection ])
315+ entities_annotation = ObjectAnnotation (
316+ name = "named-entity" , value = entities_annotation_document_entity )
313317
314318 labels = []
315319 _ , data_row_uids = dataset_pdf_entity
316320 for data_row_uid in data_row_uids :
317- labels .append (Label (
318- data = TextData (
319- uid = data_row_uid ),
320- annotations = [
321- entities_annotation ,
322- ]
323- )
324- )
325-
321+ labels .append (
322+ Label (data = TextData (uid = data_row_uid ),
323+ annotations = [
324+ entities_annotation ,
325+ ]))
326326
327327 import_annotations = MALPredictionImport .create_from_objects (
328328 client = client ,
@@ -331,4 +331,4 @@ def test_pdf_document_entity(client, configured_project_pdf_entity, dataset_pdf_
331331 predictions = labels )
332332 import_annotations .wait_until_done ()
333333
334- assert import_annotations .errors == []
334+ assert import_annotations .errors == []
0 commit comments