Home » API » Yahoo Content Analysis API

Yahoo Content Analysis API

Posted in API Tagged , , ,

Pretargeting requires analyzing the list of URLs to find the most relevant keyword for a URL. Yahoo Content Analysis is one of the APIs used for analysis.

Keyword is extracted from Yahoo API, and the corresponding weightage (score) for that keyword is analysed. In the API, enable_categorizer is set, to find the category of the URL, with the relevant score.

Below is the sample XML output, extracted and processed:

<?xmlversion=”1.0″encoding=”UTF-8″?>
<queryxmlns:yahoo=”http://www.yahooapis.com/v1/base.rng”
yahoo:count=”2″yahoo:created=”2012-03-11T15:30:34Z”yahoo:lang=”en-US”>
<diagnostics>
<publiclyCallable>true</publiclyCallable>
<user-time>116</user-time>
<service-time>90</service-time>
<build-version>25587</build-version>
</diagnostics>
<results>
<yctCategoriesxmlns=”urn:yahoo:cap”>
<yctCategoryscore=”0.999337″>Politics &amp; Government</yctCategory>
<yctCategoryscore=”0.721854″>Government</yctCategory>
</yctCategories>
<entitiesxmlns=”urn:yahoo:cap”>
<entityscore=”0.993251″>
<textend=”6656″endchar=”6656″start=”6642″startchar=”6642″>Lucas Papademos</text>
<wiki_url>http://en.wikipedia.com/wiki/Lucas_Papademos</wiki_url>
<related_entities>
<wikipedia>
<wiki_url>http://en.wikipedia.com/wiki/George_Papandreou</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Debt_restructuring</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/European_Central_Bank</wiki_url>
</wikipedia>
</related_entities>
</entity>
<entityscore=”0.938968″>
<textend=”2735″endchar=”2735″start=”2720″startchar=”2720″>unity government</text>
</entity>
<entityscore=”0.927013″>
<textend=”2707″endchar=”2707″start=”2699″startchar=”2699″>Papademos</text>
<types>
<typeregion=”us”>/person</type>
</types>
</entity>
<entityscore=”0.914795″>
<textend=”7148″endchar=”7148″start=”7128″startchar=”7128″>European Central Bank</text>
<wiki_url>http://en.wikipedia.com/wiki/European_Central_Bank</wiki_url>
<types>
<typeregion=”us”>/organization</type>
<typeregion=”us”>/organization/company/other</type>
</types>
<related_entities>
<wikipedia>
<wiki_url>http://en.wikipedia.com/wiki/Jean-Claude_Trichet</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Eurozone</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Axel_Weber</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Euro</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Currency_sign</wiki_url>
</wikipedia>
</related_entities>
</entity>
<entityscore=”0.843647″>
<textend=”10362″endchar=”10362″start=”10338″startchar=”10338″>national unity government</text>
<wiki_url>http://en.wikipedia.com/wiki/Zimbabwe_Government_of_National_Unity_of_2009</wiki_url>
</entity>
<entityscore=”0.794965″>
<textend=”7461″endchar=”7461″start=”7452″startchar=”7452″>government</text>
</entity>
<entityscore=”0.748128″>
<textend=”11218″endchar=”11218″start=”11187″startchar=”11187″>Prime Minister George Papandreou</text>
</entity>
<entityscore=”0.680339″>
<textend=”7417″endchar=”7417″start=”7399″startchar=”7399″>Evangelos Venizelos</text>
<wiki_url>http://en.wikipedia.com/wiki/Evangelos_Venizelos</wiki_url>
<types>
<typeregion=”us”>/person</type>
</types>
<related_entities>
<wikipedia>
<wiki_url>http://en.wikipedia.com/wiki/Dimitrios_Droutsas</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Virginia_Mayo</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/United_States_Secretary_of_Defense</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/Greek_language</wiki_url>
<wiki_url>http://en.wikipedia.com/wiki/ThyssenKrupp</wiki_url>
</wikipedia>
</related_entities>
</entity>
<entityscore=”0.648517″>
<textend=”10053″endchar=”10053″start=”10036″startchar=”10036″>austerity measures</text>
</entity>
<entityscore=”0.613155″>
<textend=”6001″endchar=”6001″start=”5994″startchar=”5994″>CNN Wire</text>
<types>
<typeregion=”us”>/organization</type>
</types>
</entity>
<entityscore=”0.609287″>
<textend=”7061″endchar=”7061″start=”7043″startchar=”7043″>financial stability</text>
</entity>
<entityscore=”0.609287″>
<textend=”11102″endchar=”11102″start=”11084″startchar=”11084″>financial stability</text>
</entity>
<entityscore=”0.593508″>
<textend=”9820″endchar=”9820″start=”9805″startchar=”9805″>Greek Parliament</text>
<types>
<typeregion=”us”>/organization</type>
</types>
</entity>
<entityscore=”0.590604″>
<textend=”9701″endchar=”9701″start=”9681″startchar=”9681″>DimitrisAvramopoulos</text>
<wiki_url>http://en.wikipedia.com/wiki/Dimitris_Avramopoulos</wiki_url>
<types>
<typeregion=”us”>/person</type>
</types>
</entity>
</entities>
</results>
</query>

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>