├── .gitignore ├── data └── desc.md ├── database └── desc.md ├── figs └── overview.png ├── readme.md └── src └── sources ├── data_preprocess.py ├── dataset └── ppl_train_other.json ├── llms ├── __init__.py ├── codellama.py ├── gpt.py ├── llama2.py ├── puyu.py ├── sqlcoder.py └── vicuna.py ├── nltk_data └── corpora │ └── stopwords │ ├── README │ ├── arabic │ ├── azerbaijani │ ├── basque │ ├── bengali │ ├── catalan │ ├── chinese │ ├── danish │ ├── dutch │ ├── english │ ├── finnish │ ├── french │ ├── german │ ├── greek │ ├── hebrew │ ├── hinglish │ ├── hungarian │ ├── indonesian │ ├── italian │ ├── kazakh │ ├── nepali │ ├── norwegian │ ├── portuguese │ ├── romanian │ ├── russian │ ├── slovene │ ├── spanish │ ├── swedish │ ├── tajik │ └── turkish ├── post_process.py ├── ppl_dev.json ├── ppl_dev_add_sl.json ├── run_all.sh ├── run_cross_voting.sh ├── run_one_model.sh ├── schemalink.py ├── sql_gen ├── __init__.py ├── get_example_modules.py ├── main.py └── sql_gen_utils.py └── utils ├── data_builder.py ├── datasets └── spider.py ├── enums.py ├── linking_process.py ├── linking_utils ├── abstract_preproc.py ├── application.py ├── corenlp.py ├── serialization.py └── spider_match_utils.py ├── post_process.py ├── pretrained_embeddings.py └── utils.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/.gitignore -------------------------------------------------------------------------------- /data/desc.md: -------------------------------------------------------------------------------- 1 | # spider official test data here 2 | -------------------------------------------------------------------------------- /database/desc.md: -------------------------------------------------------------------------------- 1 | # spider official test database here 2 | -------------------------------------------------------------------------------- /figs/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/figs/overview.png -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/readme.md -------------------------------------------------------------------------------- /src/sources/data_preprocess.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/data_preprocess.py -------------------------------------------------------------------------------- /src/sources/dataset/ppl_train_other.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/dataset/ppl_train_other.json -------------------------------------------------------------------------------- /src/sources/llms/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/__init__.py -------------------------------------------------------------------------------- /src/sources/llms/codellama.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/codellama.py -------------------------------------------------------------------------------- /src/sources/llms/gpt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/gpt.py -------------------------------------------------------------------------------- /src/sources/llms/llama2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/llama2.py -------------------------------------------------------------------------------- /src/sources/llms/puyu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/puyu.py -------------------------------------------------------------------------------- /src/sources/llms/sqlcoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/sqlcoder.py -------------------------------------------------------------------------------- /src/sources/llms/vicuna.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/llms/vicuna.py -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/README -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/arabic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/arabic -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/azerbaijani: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/azerbaijani -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/basque: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/basque -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/bengali: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/bengali -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/catalan: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/catalan -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/chinese: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/chinese -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/danish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/danish -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/dutch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/dutch -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/english: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/english -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/finnish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/finnish -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/french: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/french -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/german: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/german -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/greek: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/greek -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/hebrew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/hebrew -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/hinglish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/hinglish -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/hungarian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/hungarian -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/indonesian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/indonesian -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/italian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/italian -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/kazakh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/kazakh -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/nepali: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/nepali -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/norwegian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/norwegian -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/portuguese: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/portuguese -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/romanian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/romanian -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/russian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/russian -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/slovene: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/slovene -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/spanish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/spanish -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/swedish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/swedish -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/tajik: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/tajik -------------------------------------------------------------------------------- /src/sources/nltk_data/corpora/stopwords/turkish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/nltk_data/corpora/stopwords/turkish -------------------------------------------------------------------------------- /src/sources/post_process.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/post_process.py -------------------------------------------------------------------------------- /src/sources/ppl_dev.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/ppl_dev.json -------------------------------------------------------------------------------- /src/sources/ppl_dev_add_sl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/ppl_dev_add_sl.json -------------------------------------------------------------------------------- /src/sources/run_all.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/run_all.sh -------------------------------------------------------------------------------- /src/sources/run_cross_voting.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/run_cross_voting.sh -------------------------------------------------------------------------------- /src/sources/run_one_model.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/run_one_model.sh -------------------------------------------------------------------------------- /src/sources/schemalink.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/schemalink.py -------------------------------------------------------------------------------- /src/sources/sql_gen/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/sources/sql_gen/get_example_modules.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/sql_gen/get_example_modules.py -------------------------------------------------------------------------------- /src/sources/sql_gen/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/sql_gen/main.py -------------------------------------------------------------------------------- /src/sources/sql_gen/sql_gen_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/sql_gen/sql_gen_utils.py -------------------------------------------------------------------------------- /src/sources/utils/data_builder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/data_builder.py -------------------------------------------------------------------------------- /src/sources/utils/datasets/spider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/datasets/spider.py -------------------------------------------------------------------------------- /src/sources/utils/enums.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/enums.py -------------------------------------------------------------------------------- /src/sources/utils/linking_process.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/linking_process.py -------------------------------------------------------------------------------- /src/sources/utils/linking_utils/abstract_preproc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/linking_utils/abstract_preproc.py -------------------------------------------------------------------------------- /src/sources/utils/linking_utils/application.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/linking_utils/application.py -------------------------------------------------------------------------------- /src/sources/utils/linking_utils/corenlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/linking_utils/corenlp.py -------------------------------------------------------------------------------- /src/sources/utils/linking_utils/serialization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/linking_utils/serialization.py -------------------------------------------------------------------------------- /src/sources/utils/linking_utils/spider_match_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/linking_utils/spider_match_utils.py -------------------------------------------------------------------------------- /src/sources/utils/post_process.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/post_process.py -------------------------------------------------------------------------------- /src/sources/utils/pretrained_embeddings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/pretrained_embeddings.py -------------------------------------------------------------------------------- /src/sources/utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maohangyu/PET-SQL/HEAD/src/sources/utils/utils.py --------------------------------------------------------------------------------