Convert natural language questions to SQL query
Project description
Text2SQL
How many times have you pulled your hair apart writing a SQL query, now use natural language to convert to appropriate SQL and save your precious hair.
Though this can be used as a standalone package, I highly recommend that you use streamlit
to play with the model interactively, to run it interactively
streamlit run t2s.py
Installation
To install this repo clone it then run setup.py
git clone https://github.com/yashbonde/text2sql.git
cd text2sql/
pip3 install -e . #text2sql
Parsing
New method of parsing to convert each DB to a graph network, red denotes foreign keys.
Trainer File
Simple trainer file.
Datasets
Using CoSQL, Spider, Sparc datasets, credit to the authors. There are a couple of things to note, we have in total 178 tables, but only 166 tables in training date and dev set has 20 tables.
License
Following are the licensing things:
- I am releasing my part of code under MIT License
transformers
code is under Apache License, Version 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file text2sql-0.1.1.tar.gz
.
File metadata
- Download URL: text2sql-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43ff3195b05ed31a6c1a8768032a5c7764a57bdbe4ebad8845d066a7d346c77b |
|
MD5 | 85aab45675372fdc03363dcf9815bd16 |
|
BLAKE2b-256 | 2d60ceb603a3c814f8f96156eaa87b6fc67ac39c1460d77ce02fb0bddb75a0d4 |