Giter Site home page Giter Site logo

graphex's Introduction

Graphine: A Dataset for Graph-aware Terminology Definition Generation

This is the implementation of the Graphex model in our EMNLP 2021 paper:

Graphine: A Dataset for Graph-aware Terminology Definition Generation.

Zequn Liu, Shukai Wang, Yiyang Gu, Ruiyi Zhang, Ming Zhang* and Sheng Wang*

https://arxiv.org/abs/2109.04018

Please cite our paper when you use this code in your work.

Data preparation

  1. Our Graphine dataset are released. Download the dataset and split each DAG into train_name.txt,train_def.txt,valid_name.txt,valid_def.txt,test_name.txt,test_def.txt. (Since the dataset is large, we suggest you to choose part of it to conduct experiments.) Put the splited data in /data/, each DAG is a directory.

  2. Generate the BioBERT embeddings and the data for global semantic embedding:

Use a pretrained Transformer model to generate the replacement of definitions for the test set given their terminologies. We use the union of the training sets in all DAGs to train the Transformer and use the union of the validation sets to early stop. We put these data in /data_full/. definition_prepare.sh is the script for training and inference.data/DAG_NAME/test_def_gen.txt will be generated. Then:

❱❱❱ python data_prepare.py

The BioBERT embeddings vectors/embeddings.txt , the data for global semantic embedding of each DAG data/DAG_NAME/phrase_dic.p, data/DAG_NAME/reversed_dic.p, data/DAG_NAME/phrase_vocab.p , data/DAG_NAME/graph.txt will be generated.

Training

  1. Encoding global semantic via graph propagation: Use Content-Aware-Node2Vec and the preprocessed data data/DAG_NAME/phrase_dic.p, data/DAG_NAME/reversed_dic.p, data/DAG_NAME/phrase_vocab.p , data/DAG_NAME/graph.txt to generate the global semantic embeddings for terminologies data/DAG_NAME/node_embeddings_phrases.p , data/DAG_NAME/node_embeddings_phrases_def.p.

  2. Fusing local and global semantic for definition generation. experiments.sh is the script for training and inference.

graphex's People

Contributors

zequnl 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.