一个python库,旨在从语义学者api检索数据
semanticscholar的Python项目详细描述
语义视图
旨在从Semantic Scholar API检索数据的python库。
如何安装
pip install semanticscholar
用法
以编程方式访问纸张和作者数据。
纸张查找
访问纸张数据:
>>>importsemanticscholarassch>>>paper=sch.paper('10.1093/mind/LIX.236.433')>>>paper.keys()dict_keys(['abstract','arxivId','authors','citationVelocity','citations','doi','influentialCitationCount','paperId','references','title','topics','url','venue','year'])>>>paper['title']'Computing Machinery and Intelligence'>>>forauthorinpaper['authors']:...print(author['name'])...print(author['authorId'])...AlanM.Turing2262347
作者查找
访问作者数据:
>>>importsemanticscholarassch>>>author=sch.author(2262347)>>>author.keys()dict_keys(['aliases','authorId','citationVelocity','influentialCitationCount','name','papers','url'])>>>author['name']'Alan M. Turing'>>>len(author['papers'])77