GithubHelp home page GithubHelp logo

thu-bpm / isesl-sql Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 1.0 85 KB

The source code of paper "Semantic Enhanced Text-to-SQL Parsing via Iteratively Learning Schema Linking Graph" in KDD2022.

Python 100.00%

isesl-sql's People

Contributors

exlaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kellygong

isesl-sql's Issues

#ISESL-SQL-main

Hello, when I was training the model, the step was always 0, right? At the same time, the training accuracy was 0:
image
image
image
image
image
image

Another question is, if the model is trained well, how can I input text and output SQL? thanks

#ISESL-SQL

According to README.md, when training the model, there is a problem, as follows:
image
But the “tables.bin” does not exist in the original spider dataset.
Thank you!

Question about oracle schema linking

Nice work!
I have noticed that the oracle schema linking information could bring a huge improvement for Spider and Spider-SYN in section3.6, I wonder that where does the oracle schema information come from for both of two datasets. Could you offer a link please?
(I guess that the oracle schema information of Spider come from SLSQL(EMNLP2020), and how about Spider-SYN? )

Besides, could you please offer more details about how you directly change the implicit graph matrix A(𝑡) in Eq. 7 based on the oracle information, becaucse I want to try this by myself. Thanks a lot.

Best wishes!

script for inference

Which script can be used for inference, i.e. loading the best model and then getting the final SQL file?

Original Spider Dataset used in the Paper + Setup Instructions to Run on a New Database

Hey,

I tried following the setup instructions given in README.md but I think because of some changes in the Spider dataset these instructions are no longer valid.

For example,

python3 -u preprocess/process_dataset.py --dataset_path data/train.json --raw_table_path data/tables.json --table_path data/tables.bin --output_path 'data/train.bin' --skip_large --semantic_graph

There is no 'data/train.json' file in the Spider dataset. But it has 'data/train_spider.json' and 'data/train_others.json' files.

I tried changing the file name, but I get the following error.

Firstly, preprocess the original databases ... Traceback (most recent call last): File "/sensei-fs/users/saudi/text2sql/ISESL-SQL/preprocess/process_dataset.py", line 74, in <module> tables = process_tables(processor, tables_list, args.table_path, args.verbose) File "/sensei-fs/users/saudi/text2sql/ISESL-SQL/preprocess/process_dataset.py", line 26, in process_tables tables[each['db_id']] = processor.preprocess_database(each, verbose=verbose) File "/sensei-fs/users/saudi/text2sql/ISESL-SQL/preprocess/common_utils.py", line 100, in preprocess_database c = [w.lemma.lower() for s in doc.sentences for w in s.words] File "/sensei-fs/users/saudi/text2sql/ISESL-SQL/preprocess/common_utils.py", line 100, in <listcomp> c = [w.lemma.lower() for s in doc.sentences for w in s.words] AttributeError: 'NoneType' object has no attribute 'lower'

If possible, please upload the original dataset used in google drive and share the link.

Also, please provide the instructions to run the pipeline on a new database. Like what files need to be created in the data folder and what scripts to use.

Your help on this is much appreciated.

Best,
Saud Iqbal

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.