Git Product home page Git Product logo

solar-framework_commonsense-inference's Introduction

solar-framework_commonsense-inference

Code release for "Learning from Missing Relations: Contrastive Learning with Commonsense Knowledge Graphs for Commonsense Inference"

Download Similarity Matrix :

gdown https://drive.google.com/uc?id=1EHMIZXP_T1UfSzCWv9Is16n8DRW3dGJx

Preprocessing

Download knowledge graphs

Commonsense Knowledge Graph Sources :

Simple preprocess

  • Download the above files, and preprocess each element in tab-separated tsv format.
# examples
subject1 \t relation1 \t object1
subject2 \t relation2 \t object2
...
  • Modify the preprocessed data path in config/{dataset}/dataset.yml
name: 'atomic'
truncate:
    subj_len: 25
    obj_len: 25
dir:
    train: {your path}
    dev: {your path}
    test: {your path}
sim: ## <- This is similarity matrix. you can download it from the above url.
    train: {your path}
    dev: {your path}

Fine-tuning

python scripts/finetune.py --dataset_type {dataset} --model_name {model_name} --model_size {model_size}

Pre-training

python scripts/feature_learn.py --dataset_type {dataset} --model_name {model_name} --model_size {model_size}

solar-framework_commonsense-inference's People

Contributors

yongho94 avatar

Stargazers

 avatar dangerous avatar  avatar  avatar  avatar Jiwung Hyun avatar Islam Mohamed avatar Weiqi Wang 王伟琪 avatar  avatar  avatar

Watchers

 avatar

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.