mirandrom / pys2 Goto Github PK
View Code? Open in Web Editor NEWA python library for the Semantic Scholar (S2) API with typed pydantic objects and various nifty functionalities.
Home Page: https://pys2.readthedocs.io/
License: MIT License
A python library for the Semantic Scholar (S2) API with typed pydantic objects and various nifty functionalities.
Home Page: https://pys2.readthedocs.io/
License: MIT License
Is your feature request related to a problem? Please describe.
It's not clear from the docs how api_key
and session
interact together in get_paper
Describe the solution you'd like
Clarify interaction in docstrings.
Describe alternatives you've considered
NA
Additional context
NA
Line 187 in 9bf44f0
Currently, adding a paper to the S2Graph implies scraping and adding all of its neighbours as well. This choice was made to allow dynamic graph exploration (with e.g. a reinforcement learning based GraphHopper) that requires information about paper (and thus scraping it) before hopping to it.
However, for simple rule-based GraphHoppers, this can add a lot of undesirable overhead when papers have large amounts of citations/references. I think the best solution would be to let S2DataStore objects lazily query the API when a paper/author is not locally cached. That way if the GraphHopper doesn't need scraped paper information (e.g. if the decision is based only on the edge type), then API calls are avoided.
Is your feature request related to a problem? Please describe.
Constructing a paper's citation graph is a common use case for the S2 API.
Describe the solution you'd like
A function for creating the citation graph of a given paperId, with a specified traversal depth in the direction of references and of citations. Include intermediate data structures to allow recovery in case of interruption (i.e. deque of unscraped paperId's; set of scraped paperId's; set of papers with errors; set of papers not found). Decide on final data structure of citation graph, how its stored/saved, and possibly an html visualization.
Describe alternatives you've considered
NA
Additional context
NA
Is your feature request related to a problem? Please describe.
Currently, if a response contains an error status code, information about the paperId/authorId is printed. This doesn't work well when trying to perform large amounts of requests over an extended period of time.
Describe the solution you'd like
Use logging
Describe alternatives you've considered
NA
Additional context
NA
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.