Coder Social home page Coder Social logo

intelcomph2020 / semanticscholarimporter Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 295 KB

Project to import and save to Postgres / Parquet data from SemanticScholar.

License: MIT License

Python 33.59% Jupyter Notebook 66.41%
semanticscholar uc3m spark

semanticscholarimporter's Introduction

SemanticScholarImporter

This repository provides code to save, import and process SemanticScholar dataset.

Semantic Scholar is a search engine for research articles powered by the Allen Institute for Artificial Intelligence.

## 1. Download raw data

  • Copy and rename config_default.cf into config.cf adjusting options as needed. You just need to fill in the first section [downloadS2]:

    • dir_data is the path to the directory where you want to save the raw data
    • S2_API_Key are your credentials for downloading the Semantic Scholar dataset. You should get in contact with the Allen Institute to get them
    • version is the version you want to download (default value latest is normally what you will want)
  • Run the following command line

python downloadSS.py

2. pySpark/SemanticScholar_to_parquet.ipynb

This notebook contains all the code to transform original json files to parquet files. This notebook should be adapted to run in your pySpark cluster

It creates the following tables in parquet format:

  • papers: information related to papers
  • authors: maps author id to their name
  • paper-author: maps each paper to its authors
  • citations: source paper to referenced paper

Additionally, the notebook includes a section to create some domain specific datasets for Artificial Intelligence and Cancer

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 101004870. H2020-SC6-GOVERNANCE-2018-2019-2020 / H2020-SC6-GOVERNANCE-2020

semanticscholarimporter's People

Contributors

beauseant avatar jeroarenas avatar joseantem avatar

Watchers

 avatar  avatar  avatar

semanticscholarimporter's Issues

Is it really necessary to have a different class for postgres than for MySQL?

The problem of having to classes, one for mysql and another for postgres is that changes done in one of them should be migrated to the other. One ends up having two different classes with many functions in common.

Would it be feasible to have a parent class with common functions, and then inherit with two different classes ?

Priority of this issue is low ... we need to discuss when and if this is implemented at all

Add option to create indexes, and don't do it while creating schema

If indexes are created from the beginning, data loading on the postgres db will be very slow. It is better to load data first, and then create indexes once the data is ready. Two choices are given:

  • Preferred: Create indexes on each table after ingesting all data relevant to that table
  • Other: Create a new option in the menu to create indexes at the very end

Enrich Author metadata with other information

We can enrich author information with:

  • influentialCitationCount: Very soundy, but probably costly to obtain, since they need to be crawled from SS using their API.
  • ORCID data
  • Affiliation and/or whether the author has Spanish affiliation or not

The priority of this enhacement is low

Create option to enrich citation table

Use Semantic Scholar API to enrich citation table with the following information:

  • isInfluential
  • BackIntent
  • MethodIntent
  • ResultIntent

This information is very useful, but probably costly to obtain. So:

  1. Check if part of this information could be obtained online, or if we have access to the software they use and it is feasible to run it
  2. Implement the possibility of enriching using the API (is this already implemented?). Add for this second case the possibility of filtering with some paper metadata. E.g., enrich only information from papers beloinging to a certain S2 Field.

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.