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

bibtex provided by APIs is not valid #104

Closed Androbin closed 1 year ago

Androbin commented 1 year ago

Describe the bug The content of the citationStyles.bibtex field is not valid Bibtex, see #89 @AmberRose2

To Reproduce https://api.semanticscholar.org/graph/v1/paper/f9377cbc1e630c834899dc5ba72fd5897f238599?fields=citationStyles

@None{Paxinos1983TheRB,
 author = {G. Paxinos and Charles Watson},
 title = {The Rat Brain in Stereotaxic Coordinates},
 year = {1983}
}

Expected behavior https://www.semanticscholar.org/paper/The-Rat-Brain-in-Stereotaxic-Coordinates-Paxinos-Watson/f9377cbc1e630c834899dc5ba72fd5897f238599

@inproceedings{Paxinos1983TheRB,
  title={The Rat Brain in Stereotaxic Coordinates},
  author={George Paxinos and Charles Watson},
  year={1983}
}
Androbin commented 1 year ago

Notice the invalid entry type, also the formatting of the author field

Androbin commented 1 year ago

Observed behavior

https://api.semanticscholar.org/graph/v1/paper/799a5f88e10a2a9efd1e6fcf9596fa7a332dc5e6?fields=citationStyles

@Article{León2022COVID-19CA,
 author = {T. León and V. Dorabawila and L. Nelson and E. Lutterloh and U. Bauer and B. Backenson and M. Bassett and Hannah Henry and B. Bregman and C. Midgley and Jennifer F. Myers and I. Plumb and Heather Reese and R. Zhao and M. Briggs-Hagen and D. Hoefer and J. Watt and B. Silk and Seemalata Jain and E. Rosenberg},
 booktitle = {MMWR. Morbidity and mortality weekly report},
 journal = {Morbidity and Mortality Weekly Report},
 pages = {125 - 131},
 title = {COVID-19 Cases and Hospitalizations by COVID-19 Vaccination Status and Previous COVID-19 Diagnosis — California and New York, May–November 2021},
 volume = {71},
 year = {2022}
}

Expected behavior

https://www.semanticscholar.org/paper/COVID-19-Cases-and-Hospitalizations-by-COVID-19-and-Le%C3%B3n-Dorabawila/799a5f88e10a2a9efd1e6fcf9596fa7a332dc5e6

@article{Len2022COVID19CA,
  title={COVID-19 Cases and Hospitalizations by COVID-19 Vaccination Status and Previous COVID-19 Diagnosis — California and New York, May–November 2021},
  author={Tom{\'a}s M. Le{\'o}n and Vajeera Dorabawila and Lauren Nelson and Emily C. Lutterloh and Ursula E. Bauer and Bryon P. Backenson and Mary T Bassett and Hannah Henry and Brooke Bregman and Claire M. Midgley and Jennifer F. Myers and Ian D. Plumb and Heather Reese and Rui Zhao and Melissa Briggs-Hagen and Dina Hoefer and James P. Watt and Benjamin J. Silk and Seemalata Jain and Eli Samuel Rosenberg},
  journal={Morbidity and Mortality Weekly Report},
  year={2022},
  volume={71},
  pages={125 - 131}
}
Androbin commented 1 year ago

Notice the special characters in the citekey and in the author field

Androbin commented 1 year ago

Observed behavior

https://api.semanticscholar.org/graph/v1/paper/5322f5f4043e5cc78c1cceaf179a4d4abc7fac3b?fields=citationStyles

@LettersAndComments{Colella2021Bell’sPF,
 author = {G. Colella and M. Orlandi and N. Cirillo},
 booktitle = {Journal of Neurology},
 journal = {Journal of Neurology},
 pages = {3589 - 3591},
 title = {Bell’s palsy following COVID-19 vaccination},
 volume = {268},
 year = {2021}
}

Expected behavior

https://www.semanticscholar.org/paper/Bell%E2%80%99s-palsy-following-COVID-19-vaccination-Colella-Orlandi/5322f5f4043e5cc78c1cceaf179a4d4abc7fac3b

@article{Colella2021BellsPF,
  title={Bell’s palsy following COVID-19 vaccination},
  author={Giuseppe Colella and Massimiliano Orlandi and Nicola Cirillo},
  journal={Journal of Neurology},
  year={2021},
  volume={268},
  pages={3589 - 3591}
}
Androbin commented 1 year ago

Notice the invalid entry type and citekey

Androbin commented 1 year ago

Observed behavior

https://api.semanticscholar.org/graph/v1/paper/4eee535985572b8b8fa5814d13a27ae382134f73?fields=citationStyles

@None{Bhartiya2021Knowledge,AA,
 author = {S. Bhartiya and Nishant Kumar and T. Singh and S. Murugan and S. Rajavel and M. Wadhwani},
 booktitle = {International Journal of Community Medicine and Public Health},
 journal = {International Journal Of Community Medicine And Public Health},
 title = {Knowledge, attitude and practice towards COVID-19 vaccination acceptance in West India},
 year = {2021}
}

Expected behavior

https://www.semanticscholar.org/paper/Knowledge%2C-attitude-and-practice-towards-COVID-19-Bhartiya-Kumar/4eee535985572b8b8fa5814d13a27ae382134f73

@article{Bhartiya2021KnowledgeAA,
  title={Knowledge, attitude and practice towards COVID-19 vaccination acceptance in West India},
  author={Shibal Bhartiya and Nishant Kumar and Tarundeep Singh and Sathiabalan Murugan and Saranya Rajavel and Meenakshi Wadhwani},
  journal={International Journal Of Community Medicine And Public Health},
  year={2021}
}
Androbin commented 1 year ago

Notice the invalid entry type, special characters in citekey, and author formatting

AmberRose2 commented 1 year ago

Hello Robin, thank you for pointing out all these examples. You'll notice I've made some changes that should address almost all concerns here. Specifically you should see:

The one thing you pointed out in this ticket that my changes won't address is is author formatting. From what I've found there isn't specific rules against abbreviating authors names, this is just a slight difference between the way the API stores data and our online service, but both seem to be valid. For reference here's an article I've been reading