How To Extract Entity Type In Natural Language API - Google Cloud Platform
In the first blog post that used Alicia William’s script on Entity/Sentiment analysis using Apps script + NL API, it covered how to associate sentiment with the entity. However, what if you wanted to extract the entity type as well? Example here:
The original post has the instructions for the full setup. There are only two changes that you need to do.
Line 45 of the code, you create a column name called ‘Entity type’
And in line 75, call the entity.type function as part of the API request.
That’s it. If you follow the instructions mentioned in the original post + this script, you should see Entity type values getting populated. Link to first post on Entity/Sentiment analysis in Natural Language API.