GithubHelp home page GithubHelp logo

test-mass-forker-org-1 / irnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/irnet

0.0 0.0 0.0 3.03 MB

An algorithm for cross-domain NL2SQL

License: MIT License

Shell 0.87% Python 99.13%

irnet's Introduction

IRNet

Code for our ACL'19 accepted paper: Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation

Environment Setup

  • Python3.6
  • Pytorch 0.4.0 or higher

Install Python dependency via pip install -r requirements.txt when the environment of Python and Pytorch is setup.

Running Code

Data preparation

  • Download Glove Embedding and put glove.42B.300d under ./data/ directory
  • Download Pretrained IRNet and put IRNet_pretrained.model under ./saved_model/ directory
  • Download preprocessed train/dev datasets from here and put train.json, dev.json and tables.json under ./data/ directory
Generating train/dev data by yourself

You could process the origin Spider Data by your own. Download and put train.json, dev.json and tables.json under ./data/ directory and follow the instruction on ./preprocess/

Training

Run train.sh to train IRNet.

sh train.sh [GPU_ID] [SAVE_FOLD]

Testing

Run eval.sh to eval IRNet.

sh eval.sh [GPU_ID] [OUTPUT_FOLD]

Evaluation

You could follow the general evaluation process in Spider Page

Results

Model Dev
Exact Set Match
Accuracy
Test
Exact Set Match
Accuracy
IRNet 53.2 46.7
IRNet+BERT(base) 61.9 54.7

Citation

If you use IRNet, please cite the following work.

@inproceedings{GuoIRNet2019,
  author={Jiaqi Guo and Zecheng Zhan and Yan Gao and Yan Xiao and Jian-Guang Lou and Ting Liu and Dongmei Zhang},
  title={Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation},
  booktitle={Proceeding of the 57th Annual Meeting of the Association for Computational Linguistics (ACL)},
  year={2019},
  organization={Association for Computational Linguistics}
}

Thanks

We would like to thank Tao Yu and Bo Pang for running evaluations on our submitted models. We are also grateful to the flexible semantic parser TranX that inspires our works.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

irnet's People

Contributors

jasperguo avatar microsoftopensource avatar gaoyancheerup avatar substill avatar microsoft-github-operations[bot] 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.