Tuesday 10 May 2016

IBM Bluemix : Enhancing Cloud Applications using Managed Services - Part 4

d. Describe cognitive capabilities to process unstructured data and images in IBM Bluemix PaaS

1. Alchemy Language API services include sentiment analysis, entity extraction, relationship extraction, concept tagging, text extraction, language extraction, and microformat parsing
Alchemy Language API's text analysis functions include:

 Entity extraction - identify the proper nouns, i.e. people, companies, locations, etc.
 Sentiment analysis - determine the overall sentiment or sentiment specific to a keyword or entity.
 Keyword extraction - extract the important terms.
 Concept tagging - identify the overall concepts of the text.
 Relation extraction - extract subject-action-object relations.
 Taxonomy Classification - automatically categorize your text, HTML or web-based content into a hierarchical taxonomy.
 Author extraction - identify the author of a blog post or news article.
 Language detection - detect 97+ languages.
 Text extraction - pull out only the import content from a web page.
 Feed detection - extract the ATOM or RSS feeds from a web page.
 Microformats Parsing - Automatically detect and parse the microformats embedded within a webpage.
 Linked Data Support - AlchemyAPI supports Linked Data in the web thereby exposing, sharing, and connecting pieces of data, information, and knowledge on the Semantic Web using URIs and RDF

For example the Taxonomy Classification API service provides an easy way to categorize a public web page, uploaded text or uploaded html. To perform taxonomy classification of a public web page use:

API endpoints: URLGetRankedTaxonomy
Output: detected language and topic categories identified in data
Parameters: (apikey, text, url, outputMode, callback, baseURL)
Response: (status, url, detected category, score, statusInfo)

Using the endpoint http://access.alchemyapi.com/calls/url/URLGetRankedTaxonomy and providing the url: http://www.nytimes.com/2013/07/13/us/politics/a-day-of-friction-notable-even-for-a-fractious-congress.html?_r=1

The service returns a response object of the form (when the outputMode is specified as json):

{"status": "OK","usage": "By accessing AlchemyAPI or using information generated by
AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use:
http://www.alchemyapi.com/company/terms.html","url": "http://www.nytimes.com/2013/07/13/us/politics/a-day-of-friction-notable-even-for-a-fractious-congress.html?_r=2", "totalTransactions": "1“,"language": "english","taxonomy": [{"label": "/law, govt and politics/politics","score": "0.769694" },{"label": "/law, govt and politics/government","score": "0.613808" },{"label": "/law, govt and politics/legalissues/legislation","score": "0.512705"}]}


The API endpoints for uploading text or html are TextGetRankedTaxonomy, HTMLGetRankedTaxonomy and provide similar taxonomy classification services.

Another popular AlchemyAPI is SentimentAnalysis that provides an easy way to identify positive/negative sentiment within any document or web page. You can compute document-level sentiment, user-specified sentiment, entity-level and keyword-level sentiments. To perform sentiment analysis of a public web page use:

API endpoints: URLGetTextSentiment Output: Identifies the attitude, opinion and feeling towards a person/organization/product/location etc. Parameters: (apikey, text, url, outputMode, callback, showSourceText) Response: (status, url, detected category, score, statusInfo)

Using the endpoint http://access.alchemyapi.com/calls/url/URLGetTextSentiment and providing the url: http://www.politico.com/

The service returns a response object of the form:

URL sent to URLGetTextSentiment AlchemyAPI --> http://www.politico.com/
<?xml version="1.0" encoding="UTF-8"?><results>
<status>OK</status>
<usage>By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html</usage>
<url>http://www.politico.com/</url>
<totalTransactions>1</totalTransactions>
<language>english</language>
<docSentiment>
<mixed>1</mixed>
<score>-0.437706</score>
<type>negative</type>
</docSentiment></results>

The API endpoints for uploading text or html are TextGetTextSentiment, HTMLGetTextSentiment and provide similar sentiment analysis services.

2. Alchemy Vision API services include imaging tagging, link extraction and face detection/recognition

Alchemy Vision function includes the following:

 Image Link Extraction - perform image link extraction on Internet-accessible URLs and posted HTML files.
 Image Tagging - perform image tagging on your Internet-accessible URLs and posted image files.
 Face Recognition - perform face detection and recognition on your Internet-accessible URLs and posted image files.

For example, the Image Tagging API provides an easy way to scan a provided URL and find the most prominent image which can be tagged. It also provides an endpoint to provide image tagging on uploaded images. To extract image keywords from an URL use:

API endpoints: URLGetRankedImageKeywords
Output: find the most prominent image, classify and tag it
Parameters: (apikey, text, url, outputMode, callback, baseURL)
Response: (status, url, detected category, score, statusInfo)

Using the endpoint http://access.alchemyapi.com/calls/url/URLGetRankedImageKeywords and providing the http://farm4.staticflickr.com/3726/11043305726_fdcb7785ec_m.jpg

The service returns a response object of the form:

URL sent to URLGetRankedImageKeywords AlchemyAPI --> http://farm4.staticflickr.com/3726/11043305726_fdcb7785ec_m.jpg

<?xml version="1.0" encoding="UTF-8"?><results>
<status>OK</status>
<usage>By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html</usage>
<url>http://farm4.staticflickr.com/3726/11043305726_fdcb7785ec_m.jpg</url>
<totalTransactions>4</totalTransactions>
<imageKeywords>
<keyword>
<text>cat</text>
<score>0.998887</score>
</keyword>
<keyword>
<text>animal</text>
<score>0.768525</score>
</keyword>
<keyword>
<text>pet</text>
<score>0.574443</score>
</keyword>
</imageKeywords></results>

The API endpoint for uploading an image is ImageGetRankedImageKeywords, and provides similar image keyword tagging.

Reference: http://www.alchemyapi.com/api


2 comments:

  1. This blog is so nice to me. I will keep on coming here again and again. Visit my link as well.. managed it services

    ReplyDelete
  2. Thanks for providing your information, Keep share and update AWS Online Training

    ReplyDelete

Popular Posts

Powered by Blogger.

Recent Comments

Contact Form

Name

Email *

Message *

Followers