NL2SQL
Bidirectional Attention for SQL Generation
Install / Use
/learn @guotong1988/NL2SQLREADME
Natural Language to SQL
https://arxiv.org/abs/1801.00076
Installation
The data is in data.tar.bz2. Unzip the code by running
tar -xjvf data.tar.bz2
The code is written using PyTorch in Python 2.7. Check here to install PyTorch. You can install other dependency by running
pip install -r requirements.txt
Downloading the glove embedding.
Download the pretrained glove embedding from here using
bash download_glove.sh
Extract the glove embedding for training.
Run the following command to process the pretrained glove embedding for training the word embedding:
python extract_vocab.py
Train
The training script is train.py. To see the detailed parameters for running:
python train.py -h
Some typical usage are listed as below:
Train a model with bi-attention:
python train.py --ca
Train a model with column attention and trainable embedding (requires pretraining without training embedding, i.e., executing the command above):
python train.py --ca --train_emb
Test
The script for evaluation on the dev split and test split. The parameters for evaluation is roughly the same as the one used for training. For example, the commands for evaluating the models from above commands are:
Test a trained model with column attention
python test.py --ca
Test a trained model with column attention and trainable embedding:
python test.py --ca --train_emb
Reference
https://github.com/xiaojunxu/SQLNet
Related Skills
oracle
339.1kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
prose
339.1kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Command Development
83.8kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
Plugin Structure
83.8kThis skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.
