Git Product home page Git Product logo

sciencer-toolkit's People

Contributors

hineios avatar ratuspro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pipzcorreiaz

sciencer-toolkit's Issues

Limit S2 query by terms size of requests

While using the /paper/search entrypoint, the sum of the limit and offset must be less than 10000

The sum of offset and limit must be < 10000 (ref)

The semantic scholar provider crashes when the limit + offset are greater than 10000.
Consider (1) adding a stop condition while fetching the papers and (2) constraining the maximum number of papers to 10000.

Changing models to dataclasses

Consider changing the Paper and PapersIDs models implementation to dataclasses (ref). Only works on python 3.7 or above.

Implementing these models as dataclasses will remove the complex interfaces they currently have.

Update CollectByTerms to reduce requests

Currently the CollectByTerms performs 1 request to the API (get_paper_by_terms), which returns N papers according to the query. Then, it performs N requests to get all the information of each paper (get_paper_by_id). Although there is a parameter to choose the output fields of the first query, there is no way to retrieve the ids of references and citations. I believe that is the reason for having those N extra requests inside the CollectByTerms.

I would like to suggest or discuss the possibility of not doing those N extra requests inside the CollectByTerms and, probably, only perform them in the expanders (where they will be needed?!). I think Sciencer was designed having in mind a pipeline that starts with a small set of papers, then it could be expanded and possibly be filtered. However, another possibility is to start with a huge set of papers and then start filtering and possibly expanding later. In those cases doing so many requests takes a huge time and most of those papers will probably be filtered afterwards, which means wasted time.

Filters too restrict when paper lack some properties

When using Filters to check paper's validity, the developer should define the default validity when the necessary properties are not available.

Consider adding an optional parameter to the constructor of the adequate Filters:
FilterByAbstract(word='keyword', accept_when_empty=True)

Expansion Diagram

One of the motivators that lead to the development of Sciencer was the necessity to formalize the expansion flowchart of a systematic review. Besides the source code used to define an expansion, a visual representation should also be made available.

Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) has been widely used to report systematic reviews and meta analyses across several research fields. PRISMA flowchart describes not only the criteria for the systematic review but also the results.

Consider adding a method to generate a flowchart reporting the expansion to Sciencer Toolkit.

Remove LogCallbacks from core

By default, a new LogCallbacks is added to Sciencer.iteration.
Instead, the developer should decide whether to use it or not.

As such, the LogCallbacks must not be added by default to the iteration's callbacks.

KeyError: 'data' in semantic_scholar_provider.py line 151

An error was launched when running the examples/example_1_hello_world.py (I provided an API key, IDK if it is relevant). It seems the response did not have a "data" field.

Traceback (most recent call last):
  File "/home/ricardo/Documents/Projects/sciencer-toolkit/./examples/example_1_hello_world.py", line 77, in <module>
    first_batch = s.iterate(
  File "/home/ricardo/Documents/Projects/sciencer-toolkit/venv/lib/python3.9/site-packages/sciencer/core.py", line 249, in iterate
    paper_after_expansion.update(expander.execute(
  File "/home/ricardo/Documents/Projects/sciencer-toolkit/venv/lib/python3.9/site-packages/sciencer/expanders/expand_by_authors.py", line 32, in execute
    author_papers = provider.get_papers_by_author(author_id)
  File "/home/ricardo/Documents/Projects/sciencer-toolkit/venv/lib/python3.9/site-packages/sciencer/providers/semantic_scholar_provider.py", line 151, in get_papers_by_author
    paper_json) for paper_json in response_json["data"]])
KeyError: 'data'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.