GithubHelp home page GithubHelp logo

unisar_text2sql's Introduction

国网人工智能竞赛冠军

Introduction

This paper introduces UniSAr.

Dataset and Model

Spider -> ./data/spider

Fine-tuned BART model -> ./models/spider_sl

Main dependencies

  • Python version >= 3.6
  • PyTorch version >= 1.5.0
  • pip install -r requirements.txt
  • fairseq is going though changing without backward compatibility. Install fairseq from source and use this commit for reproducibilty. See here for the current PR that should fix fairseq/master.

Evaluation Pipeline

Step 1: Preprocess via adding schema-linking and value-linking tag.

python step1_schema_linking.py

Step 2: Building the input and output for BART.

python step2_serialization.py

Step 3: Evaluation Script with/without constrained decoding.

python step3_evaluate.py --constrain

Results

Prediction: 69.34

Prediction with Constrain Decoding: 70.02

Interactive

python interactive.py --logdir ./models/spider-sl --db_id student_1 --db-path ./data/spider/database --schema-path ./data/spider/tables.json

Reference Code

https://github.com/ryanzhumich/editsql

https://github.com/benbogin/spider-schema-gnn-global

https://github.com/ElementAI/duorat

https://github.com/facebookresearch/GENRE

unisar_text2sql's People

Contributors

longxudou avatar 612twilight avatar

Stargazers

 avatar kedaya avatar Yuan Jinjie avatar

Watchers

James Cloos avatar

Forkers

tyfann qbuer

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.