Reputation: 9183
I was expecting to get the offset set based on the position of the entity within the request text block, however, for all the entities identified the offset is set at -1 in the response.
Upvotes: 0
Views: 188
Reputation: 9183
Make sure to set the encoding type in your request. When the entity type is not set in the request call, the API sets the offset to -1 in the response. For more details visit https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType.
Upvotes: 3