allenai / s2-folks

Public space for the user community of Semantic Scholar APIs to share scripts, report issues, and make suggestions.
Other
144 stars 25 forks source link

Fail to search Academic Medicine venue #150

Closed mededmentor closed 8 months ago

mededmentor commented 8 months ago

Describe the bug The paper bulk search API does properly filter by the Academic Medicine venue.

To Reproduce Look at a paper that is published in the journal Academic Medicine. https://api.semanticscholar.org/graph/v1/paper/1e514d774d79df5b2266bbac1784ce7964129306?fields=title,venue,publicationVenue

Results: {"paperId": "1e514d774d79df5b2266bbac1784ce7964129306", "publicationVenue": null, "title": "Responding to Patients and Society in Distress.", "venue": "Academic medicine : journal of the Association of American Medical Colleges"}

The venue name appears to be "Academic medicine : journal of the Association of American Medical Colleges"

However, using that venue as the search in the API does not work. It returns a bunch of unrelated papers.

https://api.semanticscholar.org/graph/v1/paper/search/bulk?venue=Academic%20medicine%20:%20journal%20of%20the%20Association%20of%20American%20Medical%20Colleges&fields=title,venue,year&year=2023-

Trying to search with ISO4 abbreviation "Acad Med" also does not work. It returns 0 entries. https://api.semanticscholar.org/graph/v1/paper/search/bulk?venue=Acad%20Med&fields=title,venue,year&year=2023-

Expected behavior Searching using the venue name should work, either with ISO4 or with the venue name.

Additional context https://www.semanticscholar.org/search?venue%5B0%5D=Academic%20medicine%20%3A%20journal%20of%20the%20Association%20of%20American%20Medical%20Colleges&q=medical%20education&sort=relevance

Interestingly, searching using the search filter works.

cfiorelli commented 8 months ago

Moving to triage on backend board:

rodneykinney commented 8 months ago

One issue here is that the venue search string "Academic medicine : journal of the Association of American Medical Colleges" actually combines the names of two different journals:

"name": "Journal of the Association of American Medical Colleges",
"type": "journal",
"alternate_names": [
"J Assoc Am Med Coll"
],
"issn": "0095-9545",

and

"name": "Academic Medicine",
"type": "journal",
"alternate_names": [
"Acad Med"
],
"issn": "1040-2446",

This is why the example paper has a "venue" (un-normalized name) but not a "publicationVenue" (normalized).

rodneykinney commented 8 months ago

Fixed search to work for both normalized and unnormalized venue names:

https://api.semanticscholar.org/graph/v1/paper/search/bulk?venue=Academic%20medicine%20:%20journal%20of%20the%20Association%20of%20American%20Medical%20Colleges&fields=title,venue,year&year=2023-

{
"total": 372,
"token": null,
"data": [
{
"paperId": "002da3dedb3b306a6d33e8691f288a4df01bab7a",
"title": "Sharps Injuries Among Medical Trainees and Attending Physicians",
"venue": "Academic medicine : journal of the Association of American Medical Colleges",
"year": 2023
},
{
"paperId": "00c7c96d804d0f03e7de46a3d7cd185256073247",
"title": "Coaching in Humanism: A Pilot Program for Medical Students.",
"venue": "Academic medicine : journal of the Association of American Medical Colleges",
"year": 2023
},
...
cfiorelli commented 8 months ago

FYI @mededmentor

mededmentor commented 8 months ago

It works, thanks everyone!