heidloff.net - Building is my Passion

Text Analysis via AlchemyAPI to identify Entities, Concepts and Sentiments

The AlchemyAPI service on Bluemix provides multiple AlchemyLanguage APIs that offer text analysis through natural language processing. Below are some samples that show how to extract entities and concepts and how to understand sentiments.

AlchemyLanguage provides 12 different APIs to analyze text. The APIs can be invoked separately or via a combined call to optimize network requests. Here is a quick sample how to invoke the service to find entities, concepts and sentiments for my last blog entry.

curl -G "http://gateway-a.watsonplatform.net/calls/url/URLGetCombinedData?extract=entity,doc-sentiment,author,concept&apikey=[YOUR_API_KEY]&sentiment=1&outputMode=json&url=http://heidloff.net/article/worker-safety-demo-watson-iot-platform"


Entity Extraction API
The Entity Extraction API returns named entities like persons, companies, places and several other entity types. For each entity it also returns linked data from sources like DBpedia and Freebase. In the example above “IBM” has been identified as a company and links for further information are provided. Additionally “John Cohn” has been identified as a person, again with linked data.

Concept Tagging API
The Concept Tagging API returns concepts identified in text. This allows, for example, to explore information based on concepts rather than limiting findings to traditional text matching as the Watson Concept Insights service does it. In the example above the concept “Thomas Watson” is identified since IBM and Watson are mentioned in the article and the concept “Wii” is identified since John Cohn actually worked on hardware for the Wii.

Sentiment Analysis API
The Sentiment Analysis API returns sentiments for text for full documents as well as sentiments for entities and keywords. In the example above the overall document sentiment is positive and the entity/person John Cohn has a positive sentiment as well.

To find out more read the documentation and try the online demo.

Featured Blog Posts
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
Trending Tags