GithubHelp home page GithubHelp logo

editsql-cust's Introduction

nlp_query_builder

Dependency

The model is tested in python 3.6 and pytorch 1.0. :

pip install -r requirements.txt

Download Pretrained BERT model from here as model/bert/data/annotated_wikisql_and_PyTorch_bert_param/pytorch_model_uncased_L-12_H-768_A-12.bin.

Download the database sqlite files from here as data/database.

Run SParC experiment on EditSQL

First, download SParC. Then please follow

  • for training run: run_sparc_editsql.sh.
  • experimental logs are saved at logs/logs_sparc_editsql. Delete args.log from there before commencing training
  • The dev results can be reproduced by test_sparc_editsql.sh with the pre-trained model downloaded from here and put under logs/logs_sparc_editsql/save_31_sparc_editsql.
  • The predictions are saved at logs/logs_sparc_editsql as dev_use_predicted_queries_predictions.json

Edit data/sparc/tables.json to add a new table, edit data/sparc/dev.json and data/sparc/dev_no_value.json to add new questions:

Add the new database schema file (.sqlite file) at data/sparc/databases/new_schema_name/new_schema.sqlite and add the database name to the list of database names in data/sparc/dev_db_ids.txt

After adding new questions, delete the following folders if they exist:

  • processed_data_sparc_removefrom
  • processed_data_sparc_removefrom_test
  • data/sparc_data_removefrom These folders contain vocabulary files which need to be recreated if you have edited the dev files or added a new schema

Run output.py to get a text file named output.txt with formatted results.

editsql-cust's People

Contributors

param-raval avatar ratnam18 avatar devshree07 avatar dhrumil-softvan 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.