googleapis / google-api-nodejs-client

Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
https://googleapis.dev/nodejs/googleapis/latest/
Apache License 2.0
11.27k stars 1.91k forks source link

Please try updating your code as follows to enable the confidence score. You should then see confidence scores in the `full_text_annotation` section of the response: #3390

Closed DYT5131 closed 7 months ago

DYT5131 commented 7 months ago

How to do the same for Node JS? I am experiencing the same issue for a Node JS app.

Please try updating your code as follows to enable the confidence score. You should then see confidence scores in the full_text_annotation section of the response:

text_detection_params = vision.TextDetectionParams(enable_text_detection_confidence_score=True)
image_context = vision.ImageContext(text_detection_params=text_detection_params)
response = client.text_detection(image=image, image_context=image_context)

Originally posted by @kweinmeister in https://github.com/googleapis/python-vision/issues/266#issuecomment-973301113

ddelgrosso1 commented 7 months ago

Hi @DYT5131 please see the vision documentation. You should be able to find the equivalent NodeJS function calls there.