Text Analysis via AlchemyAPI to Identify Entities
AlchemyAPI service on Bluemix offers several AlchemyLanguage APIs with text analysis. Here's a guide to text analysis with AlchemyAPI to identify entities.
Join the DZone community and get the full member experience.Join For Free
with 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.
Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.