0

There are 2 types of documents I am dealing with PDF/TIFF. The PDF documents could be image based. We use Azure's Cognitive Vision service for OCR which returns coordinates for words like below.

"status": "succeeded",
    "createdDateTime": "2024-02-10T13:12:07Z",
    "lastUpdatedDateTime": "2024-02-10T13:12:07Z",
    "analyzeResult": {
        "version": "3.2.0",
        "modelVersion": "2022-04-30",
        "readResults": [
            {
                "page": 1,
                "angle": 0,
                "width": 8.5,
                "height": 11,
                "unit": "inch",
                "language": "en",
                "lines": [
                    {
                        "boundingBox": [
                            1.0765,
                            1.0223,
                            2.0504,
                            1.0223,
                            2.0504,
                            1.1379,
                            1.0765,
                            1.1379
                        ],
                        "text": "ONE 2 three",
                        "appearance": {
                            "style": {
                                "name": "other",
                                "confidence": 1
                            }
                        },
                        "words": [
                            {
                                "boundingBox": [
                                    1.0765,
                                    1.025,
                                    1.3286,
                                    1.025,
                                    1.3286,
                                    1.1379,
                                    1.0765,
                                    1.1379
                                ],
                                "text": "ONE",
                                "confidence": 1
                            },
                            {
                                "boundingBox": [
                                    1.4393,
                                    1.025,
                                    1.5056,
                                    1.025,
                                    1.5056,
                                    1.136,
                                    1.4393,
                                    1.136
                                ],
                                "text": "2",
                                "confidence": 1
                            },
                            {
                                "boundingBox": [
                                    1.6179,
                                    1.0223,
                                    2.0504,
                                    1.0223,
                                    2.0504,
                                    1.1379,
                                    1.6179,
                                    1.1379
                                ],
                                "text": "three",
                                "confidence": 1
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

We'd like to build a feature that given a document, we could display it online and then over lay some sort of highlighting capability so that people would be able to immediately see where certain words phrases are. For example in this case if some someone typed "ONE" in an input field, we'd be able to highlight the text (probably overlay highlight color at..) this bounding box.

"boundingBox": [
                                        1.0765,
                                        1.025,
                                        1.3286,
                                        1.025,
                                        1.3286,
                                        1.1379,
                                        1.0765,
                                        1.1379
                                    ],

I'd like to recommendations on web technologies (native or external) that could display the document types PDF and TIFF and also allow me to overlay some sort of highlighting marker that would help agents quickly find key words.

Thanks

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.