Calculating the distribution of attributes from academic entities

Another feature of the academic API is the ability to calculate the distribution of attribute values for a set of paper entities. This can be done by calling the calchistogram API endpoint.

This is a GET request, so we start by creating a query string, as follows:

    string queryString = $"expr={QueryExpression}&attributes=Y,F.FN";

    //queryString += "&model=latest";
    //queryString += "&count=10";
    //queryString += "&offset=0";

The parameters we can specify are the same as with Evaluate, except that we do not have the orderby parameter. For this call, we want to get the year of publication (Y) and the name of the field of study (F.FN).

We make the call to the API without specifying any request ...

Get Learning Microsoft Cognitive Services - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.