Thursday, August 26, 2021

Bing Search API  

Introduction: This article is a continuation of the series of articles starting with the description of SignalR service. We followed up with a discussion of Azure Gateway service, Azure Private Link, and Azure Private Endpoint and the benefit of diverting traffic to the Azure Backbone network. Then we started reviewing a more public internet-facing service such as the Bing API 

Description 

Azure Bing API is developer-friendly and provides a robust way of searching custom and scoped content with the same standard as the public internet. A customized search instance can be created using the Bing custom search portal. Bing Search API maintains an index for the internet using web crawlers.  The Bing Search API is an Azure Resource available via the Azure Marketplace. After logging in to the Azure portal, one can select either the Bing API resource or the Bing Custom Search resource.  

In this article, we continue with the discussion on advanced features of Bing API. Bing supports deep learning models. Bing uses the Fire Tokenizer which is fast and enables sub-second response time even with the execution of complex data models. The tokenization is compatible with BERT algorithm. BERT just helps with transfer learning where knowledge gained from earlier training is used with novel cases not encountered during training. Transfer learning is a machine learning technique where a model trained on one task is re-purposed on a second related task. It only works in deep learning where the model features learned from the first task are general and the features are suitable to both the base and the target tasks. This form of transfer is also called inductive transfer and the scope for the allowed hypothesis is narrowed down in a beneficial way because the model is fit on a different but related task. When the data is sparse or expensive, this focus becomes especially efficient. Bert is quite popular for Natural language processing, but Bing’s Fire tokenizers allows customizations to models. The original BERT tokenization can handle say 0.4MB/second but this tokenizer can handle up to 15 MB/second. Some of the well-known tokenization algorithms include Moore Machine that finds token boundaries and piece boundaries for Word piece and Mealy machine maps a token into ID and an ID into token such that the ids go from 0 to Number of Tokens - 1

With a subscription key, the Bing Web Search API allows searching billions of documents for content that is relevant to the user’s search string with a simple HTTP GET method. The headers allow continuity across api-calls and allow the responses to be more refined based on the history of searches. Language is can also be specified in the header.   

One specific example of text analytics with Bing Search APIs is its application to track sentiments. Major brands recognize the importance of public sentiment. It has a dual purpose. How the search results show up a brand shows how the world perceives it.  And customers are recognized by brand based on their reputation.  Building trust and maintaining positive control over the brand’s reputation can be achieved with tools such as reputation management from the Bing Search toolkit.  A brand can choose to have these insights gained from the Bing news data provider which is quite large and representative for drawing analysis. News search can be pointed outward to track a competitor’s latest release or announcements. It can also be pointed at the brand name to populate an internal dashboard with new or trending news content regarding that brand. The Bing News Search API allows extracting headlines and excerpts from articles and return them in the response. Articles, social media mentions and opinion columns can be analyzed to detect their sentiments. The Text Analytics API available from Cognitive services can work with this datastream to emit a score between 0 and 100% to show negative or positive sentiments.  Tracking the sentiments help manage the perception.

Other kind of analysis are also possible. Quantitative Analytics on usages for the Bing Search API is provided by ‘enabling the Bing Statistics’ on the Bing Azure Resource via the Azure Portal. Predefined dashboards show analytics.  

Conclusion: These are the ways in which the Bing Search Web API can be used, and it is available as just another cloud resource along with the benefits that come with a cloud service.  

 

 


No comments:

Post a Comment