guotong1988 / Nl2sql Rule
Content Enhanced BERT-based Text-to-SQL Generation
Stars: ✭ 95
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Nl2sql Rule
Omni
Distributed publishing platform and discussion network for scholars. Establishing an unenclosable scholarly commons.
Stars: ✭ 34 (-64.21%)
Mutual labels: knowledge
Tematres Vocabulary Server
Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries
Stars: ✭ 73 (-23.16%)
Mutual labels: knowledge
Textbrewer
A PyTorch-based knowledge distillation toolkit for natural language processing
Stars: ✭ 698 (+634.74%)
Mutual labels: knowledge
Programming Notes
Semua catatan tentang teknologi dan development 😎
Stars: ✭ 41 (-56.84%)
Mutual labels: knowledge
Pybossa
PYBOSSA is the ultimate crowdsourcing framework (aka microtasking) to analyze or enrich data that can't be processed by machines alone.
Stars: ✭ 670 (+605.26%)
Mutual labels: knowledge
Frontend Challenges
💥 Listing some playful open-source's challenges of companies to test your knowledge
Stars: ✭ 7,211 (+7490.53%)
Mutual labels: knowledge
Xplain
🌎 Complex Topics Explained For Your Level And Background. ✏️
Stars: ✭ 44 (-53.68%)
Mutual labels: knowledge
Hangzhou house knowledge
2017年买房经历总结出来的买房购房知识分享给大家,希望对大家有所帮助。买房不易,且买且珍惜。Sharing the knowledge of buy an own house that according to the experience at hangzhou in 2017 to all the people. It's not easy to buy a own house, so I hope that it would be useful to everyone.
Stars: ✭ 25,904 (+27167.37%)
Mutual labels: knowledge
Alexandria Library
📝 My method to capture, study, and recall interesting knowledge
Stars: ✭ 80 (-15.79%)
Mutual labels: knowledge
Minerva Training Materials
Learn advanced data science on real-life, curated problems
Stars: ✭ 37 (-61.05%)
Mutual labels: knowledge
Community
Modern Confluence alternative designed for internal & external docs, built with Golang + EmberJS
Stars: ✭ 1,286 (+1253.68%)
Mutual labels: knowledge
Awesome Tech Talks
🎓 🎬 An opinionated list of awesome videos related to IT / development topics, with a focus on training and gaining hands-on experience.
Stars: ✭ 80 (-15.79%)
Mutual labels: knowledge
Crowi
Crowi - The Markdown Wiki - Empower the team with sharing your knowledge
Stars: ✭ 1,031 (+985.26%)
Mutual labels: knowledge
NL2SQL-BERT
Content Enhanced BERT-based Text-to-SQL Generation https://arxiv.org/abs/1910.07179
Incorporating database design rule into text-to-sql generation:
- We use the matching information of the table cells and question string to construct a vector where its length is the same to the question length. This question vector mainly improves the performance of WHERE-VALUE inference result. Because it injects the knowledge that the answer cell and its corresponding table header are bound together. If we locate the answer cell then we locate the answer column which contains the answer cell.
- We use the matching information of all the table headers and the question string to construct a vector where its length is the same to the table headers’ length. This header vector mainly improves the performance of WHERE-COLUMN inference result.
Requirements
python 3.6
records 0.5.3
torch 1.1.0
Run
1, Data prepare:
Download all origin data( https://drive.google.com/file/d/1iJvsf38f16el58H4NPINQ7uzal5-V4v4 or https://download.csdn.net/download/guotong1988/13008037) and put them at data_and_model
directory.
Then run
data_and_model/output_entity.py
2, Train and eval:
train.py
Results on BERT-Base-Uncased without Execution-Guided-Decoding
Model | Dev logical form accuracy |
Dev execution accuracy |
Test logical form accuracy |
Test execution accuracy |
---|---|---|---|---|
SQLova | 80.6 | 86.5 | 80.0 | 85.5 |
Our Methods | 84.3 | 90.3 | 83.7 | 89.2 |
Data
One data look:
{
"table_id": "1-1000181-1",
"phase": 1,
"question": "Tell me what the notes are for South Australia ",
"question_tok": ["Tell", "me", "what", "the", "notes", "are", "for", "South", "Australia"],
"sql": {
"sel": 5,
"conds": [
[3, 0, "SOUTH AUSTRALIA"]
],
"agg": 0
},
"query": {
"sel": 5,
"conds": [
[3, 0, "SOUTH AUSTRALIA"]
],
"agg": 0
},
"wvi_corenlp": [
[7, 8]
],
"bertindex_knowledge": [0, 0, 0, 0, 4, 0, 0, 1, 3],
"header_knowledge": [2, 0, 0, 2, 0, 1]
}
The Table:
{
"id": "1-1000181-1",
"header": ["State/territory", "Text/background colour", "Format", "Current slogan", "Current series", "Notes"],
"rows": [
["Australian Capital Territory", "blue/white", "Yaa·nna", "ACT · CELEBRATION OF A CENTURY 2013", "YIL·00A", "Slogan screenprinted on plate"],
["New South Wales", "black/yellow", "aa·nn·aa", "NEW SOUTH WALES", "BX·99·HI", "No slogan on current series"],
["New South Wales", "black/white", "aaa·nna", "NSW", "CPX·12A", "Optional white slimline series"],
["Northern Territory", "ochre/white", "Ca·nn·aa", "NT · OUTBACK AUSTRALIA", "CB·06·ZZ", "New series began in June 2011"],
["Queensland", "maroon/white", "nnn·aaa", "QUEENSLAND · SUNSHINE STATE", "999·TLG", "Slogan embossed on plate"],
["South Australia", "black/white", "Snnn·aaa", "SOUTH AUSTRALIA", "S000·AZD", "No slogan on current series"],
["Victoria", "blue/white", "aaa·nnn", "VICTORIA - THE PLACE TO BE", "ZZZ·562", "Current series will be exhausted this year"]
]
}
Trained model
https://drive.google.com/open?id=18MBm9qzobTBgWPZlpA2EErCQtsMhlTN2
Reference
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].