Giter Club home page Giter Club logo

lqac's Introduction

Neural Multi-hop Logical Query Answering with Concept-level Answers

Requirements

  • python == 3.8.5
  • torch == 1.8.1
  • numpy == 1.19.2
  • pandas == 1.0.1
  • tqdm == 4.61.0
  • groovy == 4.0.0
  • JVM == 1.8.0_333

Datasets

YAGO4

Using the pre-processed datasets

Download and unzip YAGO4.zip from here, and replace

./data/YAGO4/input/

Dataset Construction

Download the following files: T, Aee, Aec1, and Aec2

Unzip the files to:

./data/YAGO4/raw/

Run all cells in:

./code/ppc_YAGO4/raw2mid.ipynb
./code/ppc_YAGO4/ppc.ipynb

DBpedia

Using pre-processed datasets

Download and unzip DBpedia.zip from here, and replace

./data/DBpedia/input/

Dataset Construction

Download the following files: T, Aee, and Aec

Unzip the files to:

./data/DBpedia/raw/

Run all cells in:

./code/ppc_DBpedia/raw2mid.ipynb
./code/ppc_DBpedia/ppc.ipynb

Gene Ontology (GO)

Using pre-processed datasets

Download and unzip GO.zip from here, and replace

./data/GO/input/

Dataset Construction

Download the raw data here and unzip it to:

./data/GO/raw/

Generate axioms using:

groovy ./code/ppc_GO/GetOntology.groovy ./data/GO/raw/data-train/yeast-classes.owl > ./data/GO/raw/ontology.txt

Generate intermediate data using:

cd ./code/ppc_GO/ && python raw2mid.py

Run all cells in:

./code/ppc_GO/ppc.ipynb

Run

To reproduce the main results, simply run the following commands:

python TAR.py --dataset YAGO4
python TAR.py --dataset DBpedia
python TAR.py --dataset GO

lqac's People

Contributors

lilv98 avatar

Stargazers

 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.