Code Monkey home page Code Monkey logo

quase's Introduction

QuASE

This is the code repository for the ACL paper QuASE: Question-Answer Driven Sentence Encoding. If you use this code for your work, please cite

@inproceedings{HeNgRo20,
    author = {Hangfeng He and Qiang Ning and Dan Roth},
    title = {{QuASE: Question-Answer Driven Sentence Encoding}},
    booktitle = {Proc. of the Annual Meeting of the Association for Computational Linguistics (ACL)},
    year = {2020},
}

Play with our online demo.

Installing Dependencies

Use virtual environment tools (e.g miniconda) to install packages and run experiments
python>=3.6
install pytorch
pip install pytorch-pretrained-bert==0.6.2
pip install allennlp==0.9.0

The models

Our pre-trained models can be found in the google drive.

Change the Dir Path

Change the /path/to/data (/path/to/models) to your data (models) dir.

Reproducing experiments

To reproduce our experiments based on the scripts:

sh scripts/run_script.sh
sh scripts/run_BERT_MRC.sh (an example)

To reproduce the experiments based on the allennlp (go into the allennlp-experiments dir):

allennlp train /path/to/model/configuration -s /path/to/serialization/dir --include-package models
allennlp train coref_bert.jsonnet -s coref-bert --include-package models (an example)

To reproduce the experiments based on the flair (go into the flair-experiments dir):

python ner_flair.py
python ner_flair_semanticbert.py

To train a s-QuASE/p-QuASE with your own QA data (SQuAD format):

sh scripts/run_SemanticBERT_SQuAD.sh
sh scripts/run_BERT_squad_51K.sh

SRL Evaluation:
The SRL metric implementation (SpanF1Measure) does not exactly track the output of the official PERL script (is typically 1-1.5 F1 below), and reported results used the official evaluation script (allennlp-experiments/run_srl_evaluation.sh).

quase's People

Contributors

hornhehhf avatar woffee avatar heglertissot 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.