How to query paper entity data by DOI in MAG-Academic Knowledge API(cognitive service) - azure-cognitive-services

How to extract the paper data by querying DOI as a parameter, in GET/POST request URL.
Basically, I tried with by querying paper Id as a parameter. Please refer my sample code as followed.
https://api.labs.cognitive.microsoft.com/academic/v1.0/evaluate?expr=And(Id=2153635508)&model=latest&count=50&offset=0&attributes=Ti,E.DOI
I am getting the output as-
{"expr": "And(Id=2153635508)","entities":[{"logprob": -13.241,"prob": 1.7762609374E-06,"Id": 2153635508,"Ti": "libsvm a library for support vector machines","DOI": "10.1145/1961189.1961199","PK": 2153635508}]}
Basically, I want the same output by the help of DOI instead of Id in the query parameter.

The expr-field should be DOI='{DOI}', for example:
https://api.labs.cognitive.microsoft.com/academic/v1.0/evaluate?&expr=DOI=%2710.1145/2883851.2883895%27&count=10&attributes=AA.AuN,AA.AuId,Ti,VFN,Y&orderby=Y:desc&subscription-key={YOUR-KEY}
You can change the attributes field to get the data you need.

Related

Working on dynamic responses from a data source in klipfolio

Basically, In our data source, I have used facebook graph api to get the list of all posts including likes, shares and comments for each post.
I receive a json response in which we are getting "shares" keys presence is inconsistent which means inside json array which consists facebook post json object that in some cases have shares key value and in some cases its absent.
So, while using this data source in our klip, "shares" key value are not mapped correctly with the other post details.
It is because, when we use data source like this : #/data/shares/count , it will provide the value of shares for each post but in some cases where "shares" key is not present or absent for that data, then it replaces the value by the next found "shares" key value but it needs to be 0 so that data in the klip should be mapped exactly.
DATA SOURCE
KLIP
Due to Facebook not returning a JSON record if there is no data for that record, you will need to manipulate the data with xpath axes. If you want to "pad" 0 where there is no record, you will also need to use LOOKUP(). For example:
Shares = #/data/shares/count
66 records
IDs where there are shares= #/data/id[preceding-sibling::count]
66 records
LOOKUP(#/data/id,
#/data/id[preceding-sibling::count],
#/data/shares/count)
LOOKUP will return 100 records and pad where there is no share count value.

Getting Papers based on certain keyword from microsoft academic

How can we get id of papers based on keyword.
e.g to get all paper ids of computer science from Microsoft Academic API
Microsoft academic
graph search API
Given your example, I assume you mean "field of study" for computer science.
Please, try this query:
https://api.projectoxford.ai/academic/v1.0/evaluate?expr=Composite(F.FN='computer science')&model=latest&attributes=Id
Currently, values of attribute "W" (keyword) are single words, therefore in order to get both "computer" and "science" you need to use And() query.
See example below (I added "Ti" [title] attribute to output):
https://api.projectoxford.ai/academic/v1.0/evaluate?expr=And(W='computer', W='science')&model=latest&attributes=Id,Ti
Please, note that you need to specify "Ocp-Apim-Subscription-Key" field in header of HTTP request, the value should be your subscription id.

Microsoft Academic--how to search for a paper by DOI?

I can get good results with evaluate queries on titles and author names (and interpret queries).
But what if I want to look up a paper by DOI?
I can get the DOI information of an entry by the extended metadata description (in the attributes of an existing search), but since the extended metadata is a JSON-encoded string which only supports matching, I can't work out how to use the expr field to query by DOI and get a specific paper.
As DOI is not an indexed (separate) attribute, you can not searched publication by DOI now. We decided to add DOI attribute to schema, so you will be able to execute a query like /evaluate?expr=DOI='10.1159/000312628' soon.
You can query with DOI now. However you have use capital letters for the DOI value as suggested in https://learn.microsoft.com/en-us/academic-services/project-academic-knowledge/reference-query-expression-syntax. For example, if it is 10.1016/j.stem.2015.01.015, query according to this DOI=='10.1016/J.STEM.2015.01.015'

How do I get a Price for Amtrak rail when using the Sabre RailShopRS

I am trying to implement AMTRAK Rail bookings using Sabre's RailShopRS.
I've been able to get a list of available journeys but now I'm struggling to figure out how I get a price for those journeys. It looks like the price should be part of the availability response but there never appears to be a price anywhere.
Is this something that should be part of the initial availability response or do I have to make a new request with details of the specific train and faretype?
Does this help?
http://files.developer.sabre.com/doc/providerdoc/rail/RailServicesDescription_v1.12.0.html#amtrak
Here are some sample request and responses:
http://files.developer.sabre.com/doc/providerdoc/rail/RS_Sample_RQ_RS_1_12_0.zip
There should be a list of 'Offers' within the response, with a reference to a JourneyId that can be used to match the fares with its corresponding journey/train option.

finding article by date code in google search appliance GSA

The Google Search Appliance goes through and finds out the date of each article when it crawls (last modified date is the default).
However, it doesn't turn up articles when you query by date code.
Is there any way to get the GSA to do this?
(We have a daily broadcast which people often search for by date code. Right now we have to manually put in the 4 most common date codes into the meta-keywords in order for them to be pulled up through a query)
Have you tried using inmeta:date as described in the Search Protocol Reference documentation?
Alternatively, if the date code is in the document content or the URL you could use entity recognition to extract it.
One way to make sure GSA is collecting the document date is to check the search results in XML format and see if tag has the date value. You can see the results in XML format by removing any proxystylesheet parameter in the URL.
If the value of tag is empty then GSA is not getting the document dates.
You can configure the document dates under Crawl and Index > Document Dates (at least at GSA version 7). We are using a meta tag approach. We put a date meta tag to each document/page and tell GSA to use this meta tag to sort the documents. The full list of options are:
URL
Meta Tag
Title
Body
Last Modified
Here are some links that helped me to find answers when dealing with a similar problem:
https://support.google.com/gsa/answer/2675414?hl=en
https://developers.google.com/search-appliance/documentation/64/xml_reference#request_sort_by_date
https://groups.google.com/forum/#!searchin/google-search-appliance-help/sort$20by$20date$20not$20working

Resources