O'Reilly logo

Learning Microsoft Cognitive Services - Third Edition by Leif Larsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required